recursing through files in a folder
Larry Bates
lbates at syscononline.com
Fri Oct 1 10:20:33 EDT 2004
More information about the Python-list mailing list
Fri Oct 1 10:20:33 EDT 2004
- Previous message (by thread): recursing through files in a folder
- Next message (by thread): wxPython: "Nesting" wx.NoteBooks?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Scott Carlson wrote: > New to Python. Very new. > > I need to pass a parameter to the program I create that points to a > folder. (How are params passed in?) > > Then, I need to be able to scroll through each file in the folder, > looking for files with a particular naming convention. > > What is the best way to be able to look at each file in a folder and > decide if I wish to use that one, and then go to the next file? > > Thanks, > Scott Use getopt to pick up the root directory from call line Use os.path.walk to walk each of the files/directories Use glob.glob to get a list of files that match Larry Bates
- Previous message (by thread): recursing through files in a folder
- Next message (by thread): wxPython: "Nesting" wx.NoteBooks?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list