recursive using the os.walk(path) from the os module

Simon Brunning simon at brunningonline.net
Wed Sep 17 08:41:39 EDT 2008


2008/9/17 A. Joseph <joefazee at gmail.com>:
> I want to search through a directory and re-arrange all the files into e.g
>
> All .doc files go into MS WORD folder, all .pdf files goes into PDF Folder.
>
> I`m thinking of doing something with the os.walk(path) method from os
> module, I need some ideal how the algorithm should look like, maybe
> recursive ..any deal?

This help?

http://code.activestate.com/recipes/499305/

-- 
Cheers,
Simon B.
simon at brunningonline.net
http://www.brunningonline.net/simon/blog/
GTalk: simon.brunning | MSN: small_values | Yahoo: smallvalues | Twitter: brunns



More information about the Python-list mailing list