Sample Header Ad - 728x90

Running Python script over multiple directories and multiple files

1 vote
1 answer
5308 views
Here is my command line for python: python script.py -a .faa -n .fna I have a directory containing multiple directories. Out of these multiple directories, there could be 1 or more folders. In these 1 or more folders, I need to run my python script on the .faa and .fna files. How do I do this? Example tree:
Staph1 ----> [CO1, CO2] ----> [.fna, .faa] from CO1, [.fna, .faa] from CO2

Staph2 ----> [CO6] ----> [.fna, .faa] from CO6
My Python script will use the inputs .fna and .faa and output within the folder. Also the folder and directory are synonymous.
Asked by Jeff (11 rep)
Aug 14, 2014, 08:20 PM
Last activity: Jul 24, 2025, 02:05 PM