Answered
How to get the names of all files in a directory to array
#target photoshop;
main();
function main(){
var selectedFolder = Folder.selectDialog("Please select folder");
if(selectedFolder == null) return;
var fileList= selectedFolder.getFiles();
if(fileList.length>0){
var out = new File(Folder.desktop + "/out.txt");
out.open("w");
out.encoding="UTF8";
for(var a in fileList){out.writeln(decodeURI(fileList.name));}
out.close();
}
};have a folder with more than 1000 jsx files with different filenames, I want to create a text file on the desktop that contains all the files in the folder, but I'm getting errors, please correct me, I'm sorry Thank you
In folder
name1.jsx , name2.jsx, name3.jsx....namen.jsx
I want to get to
["name1","name2",......,"namen"]
