Re: Find and replace space by the Terminal equivalent
Re: Find and replace space by the Terminal equivalent
- Subject: Re: Find and replace space by the Terminal equivalent
- From: Jay Louvion <email@hidden>
- Date: Sun, 02 Oct 2005 17:02:40 +0200
Title: Re: Find and replace space by the Terminal equivalent
le 2/10/05 14:20, Mark J. Reed à email@hidden est réputé(e) avoir écrit :
> "\ " isn't a legal AppleScript string literal. You need to double the \. "\\
> ".
>
I understood things until there. Unfortunately, the wanted result isn’t possible then ?
This is what I’ve got for the moment:
set Target to “/Users/ptilu/Desktop/Copy Stuff/”
set Target to (FindReplace(" ", "/\\ ", Target))
on FindReplace(FindWhat, ReplaceBy, ThisString)
copy the text item delimiters to OldDelims
set the text item delimiters to {FindWhat}
set tempList to every text item of ThisString
set the text item delimiters to {ReplaceBy}
set newString to tempList as text
set the text item delimiters to OldDelims
return newString
end FindReplace
But the output is not “do shell” compatible: /Users/ptilu/Desktop/Copy/\\ Stuff/
Full script as attachment. Using osxutils.
Jay Louvion
Studio Casagrande
3, rue Müller-Brun
1208 Geneva
T+4122 840 3272
F+4122 840 3271
skypeme:
jaylouvion
www.studiocasagrande.com
Attachment:
IconSetter.zip
Description: Binary data
_______________________________________________
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