Searching for variable directory
<p>I am setting up a test procedure at work which needs to open an Excel file (test results) from a directory. The issue is that the directory will constantly change based upon where the results are stored. For example:</p>

<p>File1.xls located in C:\documents\batch1 will need to be opened today.
File2.xls located in C:\documents\batch2 will need to be opened tomorrow.</p>

<p>The batch no. is always known and I have set up an interface using easygui to insert the batch no. and then store this in a variable. </p>

<p>I have been able to do something similar with the filename but not the directory itself. I have tried the open_workbook method using the xlrd module but with no luck as it seems to require a string for the directory path.</p>

<p>I have also got the user to enter in the batch no, stored into a local variable (i.e r1 = batch1), and then used os.path.exists('C:\documents\r1\') but it has not returned a boolean response.</p>

<p>I'm relatively new to Python and am sure it is probably something simple but I just can't seem to get it to work.</p>

<p>Help is much appreciated.</p>

<p>Thanks,
Matthew</p>
