write files name in a text file into data directory