Skip to content

Instantly share code, notes, and snippets.

@akhildevelops
Created October 9, 2018 02:39
Show Gist options
  • Save akhildevelops/a32594395c823a1b7bffd775ad7dacc7 to your computer and use it in GitHub Desktop.
Save akhildevelops/a32594395c823a1b7bffd775ad7dacc7 to your computer and use it in GitHub Desktop.
Extract FIlenames from a folder
import os
i=list(os.walk('.'))
k=i[0][2][1:]
k='\n'.join(k)
with open('files.txt','w') as file1:
file1.write(k)
print('done writing')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment