Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- 순댓국밥
- table
- idw
- shp내려받기
- postgis
- 테이블목록
- PostgreSQL
- Openlayers
- rc.local
- Python
- qgis
- 공주페이
- 테이블 중복조회
- SQL
- 네이버클라우드
- HP스펙터
- table비교
- tablewidget
- 데이터비교
- 하위디렉토리
- pygqis
- HP스펙터x360
- shape내려받기
- psql
- posgtresql
- 와콤뱀부슬레이트
- 테이블리턴
- ST_InvDistWeight4ma
- postgrest
- posgresql
Archives
- Today
- Total
오픈소스의 일상
Python 하위디렉토리 특정파일 추출 본문
import os
# 탐색할 디렉토리 지정
directory = "/path/to/directory"
# os.walk()를 사용하여 특정 확장자 파일만 탐색
for root, dirs, files in os.walk(directory):
for file in files:
if file.endswith(".txt"): # .txt 파일만 필터링
file_path = os.path.join(root, file)
print(file_path)
728x90
'오픈소스 > PYQGIS' 카테고리의 다른 글
Python QT-TableWidget 초기화 (0) | 2024.09.22 |
---|---|
[PYQGIS] Feature 검색방법 (0) | 2023.09.12 |
[PYQGIS] 원하는 Shape 파일을 내려받기 (0) | 2023.09.12 |
[Python] Array 중복제거 (0) | 2023.09.08 |