
December 24th, 2012, 05:57 PM
|
|
Contributing User
|
|
Join Date: Sep 2005
Posts: 54
Time spent in forums: 11 h 3 m 21 sec
Reputation Power: 8
|
|
|
Opening certain files within a directory
I have a very basic question about creating a list of files. I would like to:
1. open a directory specified by a path
2. add all files that match a certain pattern onto a file list (let's say files that start with "AML_" followed by 6 capital letters followed by an underscore and then 6 numbers and ending in ".sam")
3. close the directory
Now I can go through each file in the list and process it appropriately. I do this a lot in perl, but I'm new to python and I'm having trouble figuring out this basic operation.
Thank you.
Eric
|