View Single Post
Mark FX

Mark FX's Avatar
Member Since: Aug 13, 2011
Location: West Sussex, UK
Posts: 180
Mark FX has a spectacular aura about

Mark FX is offline
It's been a while since I have done any Applescript, but I think the problem with your code is, the choose folder command returns an HFS style path as an alias, and you want to pass a POSIX style path as an escaped string to the do shell script command, so you have to convert the returned HFS alias into a POSIX path, and then use the quoted form of command, to convert it into an escaped string, that you then use in the shell script.

Like this example.

set destinationFolder to choose folder with prompt "Choose the destination folder to save the image file."
set destinationFolderPosixPath to POSIX path of destinationFolder
do shell script "ls " & quoted form of destinationFolderPosixPath
Copy and paste this code into Applescript Editor and run it.

Hope this helps.

Regards Mark
QUOTE Thanks