get directory and file names

Bruno Desthuilliers bruno.42.desthuilliers at wtf.websiteburo.oops.com
Tue Jul 31 10:29:59 EDT 2007


Alchemist a écrit :
> I am working with Python 2.5 on Windows XP (SP2).
> 
> How can I traverse a folder, loop through a list of files and get
> their file name and extension in an elegant, pythonic way?

http://docs.python.org/lib/module-os.path.html
http://docs.python.org/lib/os-file-dir.html
(=> os.walk)




More information about the Python-list mailing list