2919 Views 3 Replies Latest reply: Apr 25, 2007 7:38 AM by JSAF
Yes, it can be done. But not necessarily with Automator alone, you need a tool that can actually process the files, I think Automator is more like a linking framework that links inputs and outputs from different tools and apps together into a workflow, rather than doing any of those detailed tasks itself.
I am not that experienced with AutoMator and AppleScript, but they can be used to select a bunch of files and perform an action on those files, maybe someone can help out with that part.
The basic job you need to perform can be done with the UNIX stream editor, /usr/bin/sed, with a command something like this:
/usr/bin/sed -e 's/oldpath/newpath/g' oldfile > newfile
This will replace all occurences of "oldpath" with "newpath" in the file: oldfile and write the results to the file "newfile"
This could be done in a UNIX script that you run in the Terminal command line, or packaged into an Apple Script that you write in Script Editor.
I hope this helps, and someone else can add some finishing touches or recommend a better approach.