Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Mudbug

Administrator emeritus
Original poster
Jun 28, 2002
3,849
1
North Central Colorado
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.
Screen%20Shot%202013-09-10%20at%202.09.17%20PM.png
Screen%20Shot%202013-09-10%20at%202.08.48%20PM.png


This is what gets passed to Mail:

/Users/colin/Desktop/test/3/file3.txt
/Users/colin/Desktop/test/2/file2.txt
/Users/colin/Desktop/test/1/file1.txt

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...)
 

subsonix

macrumors 68040
Feb 2, 2008
3,551
79
You can probably exchange the "get names of finder items" action with "run shell script" and this content:

Code:
for f in "$@"
do
	echo "$f" | sed 's/\/Users\/colin\/Desktop\/test\///g'
done

Also, select "as argument" in the upper right corner drop down menu.

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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.