Skip to content

Instantly share code, notes, and snippets.

@P7h
Created May 12, 2014 16:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save P7h/8c54f0d9adb2efdfb60a to your computer and use it in GitHub Desktop.
Save P7h/8c54f0d9adb2efdfb60a to your computer and use it in GitHub Desktop.
Python utility to create missing tsv files [numbered 1 to 78] in a directory.
import os
folder_name = 'D:/issue/'
for i in range(1, 79):
fileName = folder_name + str(i) + ".tsv"
if not os.path.isfile(fileName):
with open(fileName, 'w') as f:
f.write('word\tcount\n')
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment