Is there a function to search the HD

Simon Brunning simon.brunning at gmail.com
Tue Sep 28 11:49:12 CEST 2004


On Tue, 28 Sep 2004 10:37:07 +0200, Peter Jensen <helten0007 at yahoo.com> wrote:
> I was wondering if there is an inbuild function in python to search your
> harddrives ( Harddisk's) for a file of a speciel type. I mean can I write a
> command with 2 parameters ( one being the filetype, and the other the
> location on the harddisk where I want to search for the specific file type )

You want os.walk(). There's a simple example of its use here:

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/279003

-- 
Cheers,
Simon B,
simon.brunning at gmail.com,
http://www.brunningonline.net/simon/blog/



More information about the Python-list mailing list