Re: Help -- going posix space crazy
Re: Help -- going posix space crazy
- Subject: Re: Help -- going posix space crazy
- From: julifos <email@hidden>
- Date: Sat, 22 Feb 2003 11:09:53 +0100
>
> The following works as long as the path doesn't have any spaces in the
>
> names -- then add spaces, and I get a format error for the mv command.
>
> Any insight appreciated. Complete text of the minimized testing script
>
> is at:
>
> http://www.cyberpoet.net/as/030220help.txt
>
>
Have you heard of the 'quoted form' property for strings and Unicode text?
>
It is very useful for creating things that can be used as parameters in do
>
shell script or sent to Terminal. It encloses the given string in single
>
quotes, and escapes any single quotes within the string.
>
>
Besides, I think you're using 'POSIX path' when you mean 'POSIX file'.
>
Given an AppleScript file object (file, alias, etc.) you use the 'POSIX
>
path' property to get the Unicode text of its path. Given a string that is
>
supposedly a pathname, you use the 'POSIX file' class with that string to
>
get an AppleScript file object.
>
>
set f to choose file -- f is a file object
>
set p to POSIX path of f -- p is Unicode text of the path
>
set f1 to POSIX file p -- f1 is a file object again
>
>
set qp to quoted form of p -- qp is a path string you can send to Terminal
>
even if it contains spaces or special characters
>
>
Chris
By the way, do you know how can I do to make this work?
################
set f_ to quoted form of posix path of alias "path:to:folder:"
set f2_ to quoted form of "re ksqolis" -- * see note below
paragraphs of (do shell script "cd " & f_ & ";ls " & f2_ & "*")
################
* f2_ is "re k" + oacute + ntilde + "olis"
And I like to find files in a folder matching this simple pattern...
Tx!
JJ
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.