Re: Making a folder in the user's library
Re: Making a folder in the user's library
- Subject: Re: Making a folder in the user's library
- From: "John S. Baltutis" <email@hidden>
- Date: Sat, 5 Apr 2003 00:50:26 -0800
Thanks for the detailed reply. I think I got it under control.
Cheers
On 4/4/03, Chris Nebel wrote:
>
On Thursday, April 3, 2003, at 05:31 PM, John Baltutis wrote:
>
>
>> You could also do it shorter and more resiliently by using "path to"
>
>> and the Finder. "path to" knows about where various special folder
>
>> are, and will create them if they don't exist,
>
>
>
> Neat trick, creating things that don't exist. Where is this capability
>
> documented? I didn't know that and that's why I checked for its
>
> existence using the shell script.
>
>
It seems this isn't documented anywhere, even in the old Scripting
>
Additions Guide. (However, I know that people rely on this behavior,
>
because we got a bunch of reports when we accidentally broke it in 1.7!)
Nice to know
>
>
> Note that it doesn't work, except for those special folders. When I
>
> tried this:
>
>
>
> set appSupport to folder (((path to the application support folder
>
> from the
>
> user domain) as string) & "myFolder")
>
>
>
> I got this error:->"Finder got an error: Can't get folder \"John's JAG
>
> Mac:Users:baltwo:Library:Application Support:myFolder\"."
>
>
>
> A bit inconsistent, isn't it? Apparently, it's not tied to the folder
>
> call,
>
> but the folder/path to combo. Any more words on how it works?
>
>
You seem to misunderstand how much "path to" is responsible for.
>
Notice your placement of parentheses -- the "path to" part is simply
>
'path to the application support folder from the user domain'. That's
>
it. Anything else is not under "path to"'s control, and is not subject
>
to the auto-creation feature. Therefore, since myFolder doesn't exist
>
yet, the Finder gives you an error trying to get it.
Got it
<snip>
Also got the bit about moving special folders.
_______________________________________________
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.