Is there a script out there that will do a find/replace and change the file names of image links in an indesign file like so...
Replace with: - (hyphen)
Thanks, i read though the entire thread and picked up some great stuff, however what i'm trying to do is this...
I have an InDesign document that references a link to a file:
james smith before.tif
I want to relink this to a new file named:
So you see, i have to ammend the file name to replace [space] with [-], and then [.tif] with [.jpg]
Is there something out there that does this already or is something somebody on here could help me with?
var myOldName = "james smith before.tif";
// replace extention
var myNewName = myOldName.replace(/\.tif$/i, "") + ".jpg";
// replace spaces with dashes
myNewName = myNewName.replace(/ /g, "-")
Sweet! I haven't tested it yet but i think this is just what i need.
I will add some code for generating an array of the names in my file, then pass this through to the myOldNames variable. It should work like a charm.. i will post back with my results.