|Sep 10, 2013, 04:31 PM||#1|
Automator: trimming file path (POSIX text)
Hi everyone -
I've posted this in the apple discussions forum, but thought I might get faster help here. (http://discussions.apple.com/thread/5298918) If you can help there instead, that would work just as well.
This is what gets passed to Mail:
I want to remove the /Users/colin/Desktop/test/ from the above list when it is passed to mail. How do I do that? (it's probably right in front of me...)
I think I understand what you're talking about, but where are we going to find a duck and a rubber hose at this time of night?
|Sep 10, 2013, 06:20 PM||#2|
You can probably exchange the "get names of finder items" action with "run shell script" and this content:
for f in "$@" do echo "$f" | sed 's/\/Users\/colin\/Desktop\/test\///g' done
Keep in mind that the file path is specific to your environment, and hard coded here, so if you move the files or run it on a different computer it will probably not work without modifications.
|Thread Tools||Search this Thread|
All times are GMT -5. The time now is 10:16 PM.