#target photoshop var fname = activeDocument.name; var a = new File("\\c\\filenames.txt"); a.open('a'); a.write(fname + "\n"); a.close();
Note that code would write the document name into the filenames.txt file. It may or may not have and extension and the document may not have been saved so no file may exists and there is no path written
This is great. Just tried it, and it worked exactly as I need. Thank you so much!
FWIW, I modified the path for the file creation to work on Mac. In case it's useful to anyone else:
#target photoshop var fname = activeDocument.name; var a = new File("/Users/USERNAME/Documents/filenames.txt"); a.open('a'); a.write(fname + "\n"); a.close();