hmm, thanks for the help.  So I kinda got it working, although from an efficiency perspective it leaves a lot to be desired.<div><br></div><div>I managed to do the following:<br>1) Create a script that gives me a list of all the filenames in the folder:</div>
<div>path = &quot;...\\Leukemia_Project&quot;</div><div><div>i = 0</div><div>for (files) in os.walk(path):</div><div>    print(files)</div><div>    print(&quot;\n&quot;)</div><div>    i += 1</div></div><div>2) I manually copy and paste the resulting list from the IDLE interpreter into a .txt file</div>
<div>3) Open the .txt file in Excel, remove the few lines I don&#39;t need (ie single quotes, etc)</div><div>4) Write another python script to print the result from step 3 in a new txt file, where each filename has its own row (pretty easy to do b/c all separated by the tab in the original txt file)</div>
<div>5)Put a for loop around my original python script that takes as input each line from the result of step 4.</div><div><br></div><div>As it stands it is painfully awkward, but it works and has already saved me a lot of aggravation...</div>
<div><br></div><div><br><div class="gmail_quote">On Thu, Jun 9, 2011 at 4:07 PM, Walter Prins <span dir="ltr">&lt;<a href="mailto:wprins@gmail.com">wprins@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br><br><div class="gmail_quote"><div class="im">On 9 June 2011 20:49, B G <span dir="ltr">&lt;<a href="mailto:compbiocancerresearcher@gmail.com" target="_blank">compbiocancerresearcher@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I&#39;m trying to analyze thousands of different cancer datasets and run the same python program on them.  I use Windows XP, Python 2.7 and the IDLE interpreter.  I already have the input files in a directory and I want to learn the syntax for the quickest way to execute the program over all these datasets. <div>



<br></div><div>As an example,for the sample python program below, I don&#39;t want to have to go into the python program each time and change filename and countfile.  A computer could do this much quicker than I ever could.  Thanks in advance!<br>

</div></blockquote></div><div><br>OK, so make a function of the current program logic for a single filename, and make the base filename a parameter to that function.  Then write another function (or main program) that iterates over your directory tree and calls the processing function for each input file.  See documentation for module os, specifically os.walk().  (See here: <a href="http://docs.python.org/library/os.html" target="_blank">http://docs.python.org/library/os.html</a> )<br>

<br>If that doesn&#39;t get you going then post back again.<br><br>Walter <br></div></div>
</blockquote></div><br></div>