Advertisement
Guest User

walker

a guest
Feb 16th, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. import os
  2. from os.path import join
  3.  
  4. inputdir = raw_input('Enter directory: ')
  5. fhand = open('results.txt', 'w')
  6. filedict = dict()
  7. for (dirname, dirs, files) in os.walk(inputdir):
  8.     for filename in files:
  9.         thefile = os.path.join(dirname, filename)
  10.         fhand.write(thefile+'\n')
  11. fhand.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement