... with the file names of all the files in a directory. Is it possible?
I am using Grant Skinner's batch compile code to compile a shitload of flas at once. The problem with his code is that you have to have a schema file that contains all the flas, so every time you create a new .fla, you have to add the file to the schema file manually.
Is there any way to use jsfl to cycle through all the files in a directory and populate a text file with all the file names?
Does that make sense?
I don't know about JSFL, but you could write a batch file or a VBS file to do it for you. Create an empty text file, call it filewriter.vbs and paste this in it. When you run it it will loop through the files in the directory it's in (or wherever you point it in the getfolder method) and a file will be created listing all the files matching *.fla.
dim fso, folder, file, newfile set fso = createobject("scripting.filesystemobject") set folder= fso.getfolder("./") set newfile = fso.createtextfile("flas-to-work-on.txt") for each file in folder.files if fso.getextensionname(file) = "fla" then newfile.writeline file.name end if next set newfile = nothing set folder = nothing
Edit: I'm assuming you're on Windows BTW...