You Are Here:

Community: Developer Discussion Boards

#1 Old trivial file system walker - 2005-01-10, 22:09

Join Date: Jan 2005
Posts: 9
maht0x0r
Offline
Registered User
I copied the os.listdir() example to dump the list of files, their date and size to e:/filelog.txt for transferring to something with a bigger screen =)


http://www.proweb.co.uk/~matt/s60_file_enum.py
Reply With Quote

#2 Old 2005-01-12, 00:33

Join Date: Jan 2005
Posts: 7
jeclarim
Offline
Registered User
You might also take advantage of the function walk in the standard os.path library which can help you to write recursive file tree browsing code:

>>> def callback(arg, dir, files):
... for file in files:
... print os.path.join(dir, file)
...
>>> os.path.walk('c:', callback, None)
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia