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
- port
- 유니티
- Linux
- javascript
- PyQt5
- pandas
- PER
- Unity
- GIT
- 날짜
- python
- MySQL
- 함수
- tensorflow
- ubuntu
- mssql
- MS-SQL
- sqlite
- 리눅스
- IOS
- Excel
- flutter
- 다이어트
- PyQt
- 라즈베리파이
- 맛집
- ASP
- node.js
- urllib
- swift
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