Re: Inconsistent results with "do shell script"
Re: Inconsistent results with "do shell script"
- Subject: Re: Inconsistent results with "do shell script"
- From: Emmanuel LEVY <email@hidden>
- Date: Tue, 15 Jul 2014 13:11:58 +0200
Just in case, you can use a "create symlink" command if you install our Files.osax.
Available at:
http://satimage.fr/software/downloads/Files.osax.zip
Best,
Emmanuel
On Jul 15, 2014, at 10:38 AM, Axel Luttgens wrote:
>
> Le 15 juil. 2014 à 09:20, Lists a écrit :
>
>> [...]
>>
>> set targFile to choose file
>> set QPP to quoted form of POSIX path of targFile
>> set targFolder to "~/Desktop/"
>> set shellScpt to "ln -s " & QPP & " " & targFolder
>> do shell script shellScpt
>>
>> [...]
>>
>> tell application "AppleScript Editor"
>> choose file
>> --> alias "Sox:Users:j:Applications:Apps-Games:Adapter.app:"
>> end tell
>> tell current application
>> do shell script "ln -s '/Users/j/Applications/Apps-Games/Adapter.app/' ~/Desktop/"
>> --> error "ln: /Users/j/Desktop//: File exists" number 1
>> Result:
>> error "ln: /Users/j/Desktop//: File exists" number 1
>> The link was not created
>>
>> Any thoughts on how to make it work every time?
>
> Hello,
>
> Looks like command "ln" parses a bit too lazily its source argument.
> This should be circumvented by removing a trailing slash, if any, from the value of your variable QPP.
>
> HTH,
> Axel
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden