Python - Get file names in folder and export a txt
import os import glob files = glob.glob ('*.*') with open (os.path.realpath('filenames.txt'), 'w') as in_files: for eachfile in files: in_files.write(eachfile+'\n') input('Press ENTER to exit')