问题
my skills with javascript are about 0, I only know some html and css. I hope someone can still help me solving this.
I am working in photoshop with a script that grabs pictures, does some magic and places them into a psd file as layers. As you might guess i haven't written the script but its needed for work.
The problem is, its grabbing the .ds_store files as well as the images, which results in an error warning.
this is the line that defines the source:
var taschenQuelle = Folder.selectDialog();
alert("Click OK to start processing.", "TEASER 2014");
var listeAllerTaschen = taschenQuelle.getFiles();
How can I specify that its ignoring the system files?
Best,
Lukas
回答1:
you can ignore .dotfile
and get files have 3-characters file extension by using following a snippet.
//@target "Photoshop"
var f = Folder.selectDialog("select");
alert(f.getFiles(function (file) {return /^[^.]+\.[^.]{3}$/i.test(file.name)}));
thank you
mg
来源:https://stackoverflow.com/questions/40059681/photoshop-script-to-ignore-ds-store