title: python: Mac can read all files in a directory but Windows can't?
body: <p>This is probably a naive question since I am absolutely a newbie to python...</p>
  
  <p>I was trying to read a bunch of .txt files from a directory using Mac, and it worked perfectly, obtaining all the files without any exceptions.</p>
  
  <p>But then I realized I needed to switch to another Window computer to do the computing... and it just wouldn't read all the files.</p>
  
  <p>Here is an illustration:</p>
  
  <pre><code>import numpy as np
  import glob
  import os
  from __future__ import print_function
  
  # read all .txt files in directory
  
  names = []
  for file in os.listdir("Data/text/film/topy/"):
      if file.endswith(".txt"):
          print(file)
          names.append(file)
  
  scripts = [[] for _ in range(len(names)) ]
  for i in xrange(len(names)):
      scripts[i] = np.genfromtxt("Data/text/film/topy/"+names[i],  delimiter="\t",dtype=character,skip_header=1)
  </code></pre>
  
  <p>names is a list for the .txt file names and scripts is a list comprehension for file contents.</p>
  
  <p>There should be 365 files in there, and with Mac I could read all of them, but with Windows, only 357 files could be read...</p>
  
  <p>the file names are like these:</p>
  
  <pre><code>l_10-Things-I-Hate-About-You.txt
  l_12.txt
  l_17-Again.txt
  l_30-Minutes-or-Less.txt
  l_48-Hrs..txt
  l_50-50.txt
  l_500-Days-of-Summer.txt
  l_A-Serious-Man.txt
  l_Adaptation.txt
  l_Addams-Family,-The.txt
  l_Adventures-of-Buckaroo-Banzai-Across-the-Eighth-Dimension,-The.txt
  l_After-School-Special.txt
  </code></pre>
  
  <p>......</p>
  
  <p>Is there certain files name that prevents Windows from reading? Does anyone know the difference and why is it? Super appreciated!!</p>