User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Python section within the Software Development category of DaniWeb, a massive community of 375,229 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,259 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Python advertiser:

need python user need help!folder!

Join Date: Jan 2008
Posts: 473
Reputation: ZZucker is on a distinguished road 
Rep Power: 1
Solved Threads: 12
ZZucker's Avatar
ZZucker ZZucker is offline Offline
Posting Pro in Training

Re: need python user need help!folder!

  #2  
May 9th, 2008
With Python that is a simple task:
  1. import os
  2.  
  3. # list just the files in a given folder
  4. folder = 'C:/Temp'
  5. for (paths, dirs, files) in os.walk(folder):
  6. # testing, this shows a list of filenames
  7. print files
  8. # now loop through the list of filenames
  9. for filename in files:
  10. # testing
  11. print filename
  12. # now enter code to process each of your files
  13. # ...
  14.  
Never argue with idiots, they'll just bring you down to their level and beat you with their experience.
Reply With Quote  
All times are GMT -4. The time now is 3:56 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC