Shell problems
Shell problems
- Subject: Shell problems
- From: Reinhold Penner <email@hidden>
- Date: Sun, 8 Sep 2002 09:43:04 -1000
I seem to be having problems with a shell command in a do shell script.
So this works in the Terminal:
if (-e '/path2file1') cp -f '/path2file1' '/path2file2'
it will copy a file (path2file1) if that file exists and will do
nothing if it doesn't. As soon as I pack the above into a do shell
construct:
do shell script "if (-e '/path2file1') cp -f '/path2file1'
'/path2file2'"
I will get an error < sh: -c: line 1: syntax error near unexpected
token `cp' >
What am I doing wrong and is there another, maybe smarter, way to find
out if a file exists and if so act upon it?
-Reinhold
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.