Created
May 21, 2013 14:41
-
-
Save fmasanori/5620333 to your computer and use it in GitHub Desktop.
Find Images Files on Hard Disck C
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fnmatch | |
import os | |
imagens = ['*.jpg', '*.jpeg', '*.png', '*.tif', '*.tiff'] | |
achados = [] | |
for raiz, diretórios, arquivos in os.walk("C:\\"): | |
for extensões in imagens: | |
for arq in fnmatch.filter(arquivos, extensões): | |
print (raiz + '\\' + arq) | |
achados.append(os.path.join(raiz, arq)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment