Within Automator, how can I replace a particular string in many different files with the filename of each file?
// UPDATE
Using a "Run Shell Script" process I am able to get the body of a test file (an html file), with the string correctly replaced, but the modified file isn't being saved. I just see the file's contents as text in the "results" pane of "Run Shell Script". How do I:
a) Get the file name instead of the entire filepath?
b) Save the modified file? Do I need another step when using sed?
Best Answer
You can use a
Run Shell Script
action, with a script like this:with
Pass input:
set toas arguments
: