Python touch file
To touch a file in python, do the following:

Python
import os def touch(fname, times=None): """ touch """ with file(fname, 'wa'): os.utime(fname, times) if __name__ == '__main__': for i in range(0, 10): filename = 'somefile{i}.txt'.format(i=i) print filename touch(filename)