Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Use AppleScript to create drag and drop icons for shell scripts' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use AppleScript to create drag and drop icons for shell scripts
Authored by: vondrix on Dec 25, '03 08:00:23AM
This line:

set filename to do shell script ¬
"perl -e \"print quotemeta ('" & POSIX path of i & "');\""
is in there to deal with filenames which have spaces or special characters. POSIX path is the UNIX path of a file; the perl -e replaces /Users/foo/file with spaces in its name with /Users/foo/file\ with\ spaces\ in\ its\ name.

You can also say:

set path to POSIX path of i
and use
quoted form of path



[ Reply to This | # ]