I have over a hundred images (.tif or .TIF) that have clipped with a Path but the names are all different. Also, some have been activated to clipping paths. I need all the Paths/Clipping Paths to be named Path 1. I found an old javascript for this using ExtendScript Toolkit but it doesn't work. Any advice would be greatly appreciated.
var selFolder = Folder.selectDialog( 'Location of images to process...' );
var files = selFolder.getFiles ( /.TIF|.tif/i );// may need to edit for different formats
var newPathName = prompt ("Put your clipping path name that you want", 'Path 1', "Clipping Name")
for(var f = 0; f < files.length; f++ )
{
var doc = app.open( files[f] );
var numberOfPaths = doc.pathItems.length;
for( var p = 0; p < numberOfPaths; p++ )
{
if( doc.pathItems[ p ].kind == PathKind.CLIPPINGPATH && newPathName != doc.pathItems[ p ].name ) doc.pathItems[ p ].name = newPathName;
}
doc.close(SaveOptions.SAVECHANGES);
}