Re: A question on shell scripting in AppleScript
Re: A question on shell scripting in AppleScript
- Subject: Re: A question on shell scripting in AppleScript
- From: Bastiaan Boertien <email@hidden>
- Date: Tue, 8 Feb 2005 16:38:26 +0100
Hi Francois
I solved this problem like this
maybe there is a much easyer way but this works
set thefolder to (choose folder) as string --choose a folder whose containing a space
set thefolder to (POSIX path of thefolder) as string
if thefolder contains space then
set thefolder to thefolder, space, "\\ ")
end if
thefolder)
on thefolder)
do shell script "open " & thefolder
end openLocal
on theText, theDelimiter, ThenewTag)
set AppleScript's text item delimiters to space
set separatedText to text items of theText
set AppleScript's text item delimiters to ""
set newFolderString to item 1 of separatedText
repeat with x from 2 to count separatedText
set newFolderString to newFolderString & ThenewTag & item x of separatedText as string
end repeat
return newFolderString
end theReplace
greeting bastiaan
Op 8-feb-05 om 16:21 heeft Francois Houle het volgende geschreven:
Hi,
I'm just running into a little issue here.. I have a shell script where the path to the file contains a Space.. Int he terminal I simply wou go like this: File\ Name
However, when the command is in an AppleScript, as bellow then I get that there is an unknown identifier, wether I use "quote" signs or |vertical| signs
eg: do shell script "rm /Users/myaccount/Documents/My\ Folder"
How can I go around this ?
Frank
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
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:
This email sent to email@hidden