Re: Shell problems
Re: Shell problems
- Subject: Re: Shell problems
- From: John Delacour <email@hidden>
- Date: Sun, 8 Sep 2002 21:45:54 +0100
At 9:43 am -1000 8/9/02, Reinhold Penner wrote:
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?
Don't know shtuff but this will work
do shell script "perl -e '
open F, qq(/users/jd/junk.txt) and q~do all sorts of things~ and
print qq(Bingo!) or die $!'"
I get the same problem as you with the sh thing, no matter what I put
after the ")"
This doesn't give an error, but it doesn't copy the file either:
do shell script "if (-e '/users/jd/junk.txt') then cp -f
'/users/jd/junk.txt' '/users/jd/junk2.txt';fi;echo done"
JD
_______________________________________________
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.