Hi,
I have a folder containing over 2000 eps files and need to separate these into raster images and those containing vectors.
The script I am using opens each file in turn and uses the first layer name to determine if the file has been rasterised or not. If not then I update some meta data and close and save the file. If the layer name is "layer 1" I assume the file has vector artwork and has been rasterised, I then close the file without saving changes.
____________ the script__________
var samplesFolder = Folder("J:/Extracted_Standing_Artwork/Non_Customer")
var fileList = samplesFolder.getFiles("*.eps");
for (var i = 0; i < fileList.length; i++) {
if (fileList instanceof File) {
var fileRef = new File(fileList);
app.open( fileRef, );
var layer = app.activeDocument.activeLayer.name;
var filePath = decodeURI(app.activeDocument.path);
var fileName = decodeURI(app.activeDocument.name);
if (layer=="Layer 1"){
app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
}
else{
app.activeDocument.info.author = "Bitmap"
epsSaveOptions = new EPSSaveOptions()
app.activeDocument.close(SaveOptions.SAVECHANGES)
}}}
__________ end ____________
The result is raster files in the folder with a very recent modified date and untouched vector files.
Can anyone please suggest a better way of doing this.
It is possible to test for the "Rasterize Generic EPS Format" dialog box?
Can a javascript then "move" the vector files into a new folder to leave just the rasters in the orginal folder.
Any help would be appreciated.
Simon Kemp