I've only just cracked Applescript (crudely), now I've got to go cross-platform, and I'm a JS noob.
All that said..... I'm having trouble trying to query files that all start with the same 8 digit number in a specific folder.
In Applescript I was able to use:
set servergraphics to (name of every file in folder graphicpath where name starts with adCID) as list
This created a list of graphic files that I can match against.
I've now tried every which way I can think of to replicate this line in JS - to no avail.
Do I need to declare an array that contains the calculation?
Thanks in advance - again
var theFolder = Folder("/your drive/your folder/");
var theFiles = theFolder.getFiles();
var theResult = ;
for(i=0; i<theFiles.length; i++)
//Assuming is 8 numbers sequence is a static number.
//You can also use grep to match 8 digits >
Great. That works a treat.
I find it funny that Applescript normally takes more lines of code to do the job, but in certain instances is can replace multiple line with one.
Ah, we all have our idiosyncrasies!