Why can't this Python script get the file of "[]" in the file's folder name?
<pre><code>import os
import glob

for root, dirs, files in os.walk('F:\\workspace'):
    for txtfile in glob.iglob(os.path.join(root,'*.txt')):
        print txtfile
</code></pre>

<p>I can get the files with no "[]",and it can work if the folder name have only one of the symbols,"[" or "]".
I think I am using glob.iglob in the wrong way; but I don't know how to get the files I need without it.
Thanks for your reply.</p>
