title: py2exe: WindowsError: [Error 267] The directory name is invalid
body: <p><strong>setup.py</strong></p>
  
  <pre><code>from distutils.core import setup
  import py2exe
  
  setup(console=['program.py'])
  </code></pre>
  
  <p><strong>The error</strong></p>
  
  <pre><code>Traceback (most recent call last):
  File "program.py", line 427, in &lt;module&gt;
  File "program.py", line 242, in __init__
  WindowsError: [Error 267] The directory name is invalid: 'C:\\Users\\Bob\applications\\Program\\test\\v0.6\\dist\\library.zip/*.*'
  </code></pre>
  
  <p>The directory name refers to a zip file called <code>library</code> which is located in the dist folder and created during the compilation. </p>
  
  <p><strong>Line 240 - 246 of program.py</strong></p>
  
  <pre><code> file_list = []
   root_dir = sys.path[0]
   for path in os.listdir(root_dir):
      full_path = os.path.join(root_dir, path).lower()
      if os.path.isfile(full_path) and full_path.endswith('txt'):
          # create list of (filename, dir) tuples
          file_list.append((path.lower(), full_path))
  </code></pre>
  
  <p><strong>Line 427 of program.py</strong></p>
  
  <pre><code>gui = GuiTk(win)
  </code></pre>
  
  <p>Any ideas what causes the problem? I use Windows 7 64Bit and PortablePython 2.7.2.1 to create the executable. There are no other errors during the compilation procedure.</p>