script to record all files in directory