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 | 29 | 30 | 31 | 
													Tags
													
											
												
												- pandas
- MySQL
- swift
- flutter
- 유니티
- PyQt5
- MS-SQL
- 리눅스
- ubuntu
- sqlite
- 라즈베리파이
- Linux
- PyQt
- urllib
- Excel
- ASP
- 다이어트
- Unity
- port
- tensorflow
- IOS
- python
- node.js
- GIT
- 날짜
- javascript
- mssql
- PER
- 함수
- 맛집
													Archives
													
											
											
											
											아미(아름다운미소)
Python에서 확장자가 .wav .mp3 인 디렉토리의 모든 파일 찾기 본문
Python에서 확장자가 .wav .mp3 인 디렉토리의 모든 파일 찾기
# -*- coding: utf-8 -*- 
'''
Created on 2018. 9. 5.
@author: bhm
'''
import os
path = 'D:\RecData\Wav' 
files = os.listdir(path)
filescnt_mp3 = [i for i in files if i.endswith('.mp3')]
print len(filescnt_mp3)
filescnt_wav = [i for i in files if i.endswith('.wav')]
print len(filescnt_wav)
'랭귀지 > python' 카테고리의 다른 글
| python 엑셀(excel) 다루기 (0) | 2018.09.09 | 
|---|---|
| Python directory search and counting by specific extensions (0) | 2018.09.08 | 
| Python 유용한 os 관련 함수 (0) | 2018.09.06 | 
| python 해당시간에 특정작업실행 (0) | 2018.09.05 | 
| python open 내장함수 (0) | 2018.09.04 | 
			  Comments