title: Python Script to find file name and size of all files in a directory and save them to a text file for excel import
body: <p>I am pretty new to python and I am trying to:</p>
  
  <ul>
  <li>Within a user defined directory (1000 images)</li>
  <li>Find the file name (Finished)</li>
  <li>Find the file size (Finished)</li>
  <li>Store to an array</li>
  <li>Store array to text file</li>
  </ul>
  
  <p><pre></p>
  
  <code>from Tkinter import Tk
  from tkFileDialog import askdirectory
  from array import *
  import os
  
  Tk().withdraw()
  fileDir = askdirectory()
  print(fileDir)
  dirList=os.listdir(fileDir)
  for fname in dirList:
      print fname
      print os.path.getsize(fileDir+"/"+fname)
  </code></pre>
  
  <p></p>