Re: "as file specification" path syntax for a non-boot drive
Re: "as file specification" path syntax for a non-boot drive
- Subject: Re: "as file specification" path syntax for a non-boot drive
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 18 Jun 2007 13:03:10 -0700
- Thread-topic: "as file specification" path syntax for a non-boot drive
Note that 'file specification' has been deprecated ever since the beginning
of OS X. There are various things that might still work by some implicit
coercions but it would be a mistake to use them, since they're bound to fail
sooner or later. Find some other way to do it - there are usually lots of
ways using 'as Unicode text' or some other way. You haven't given your whole
code so it's hard to know which to suggest in your present case.
--
Paul Berkowitz
> From: Bob Majors <email@hidden>
> Date: Fri, 8 Jun 2007 10:48:58 -0700
> To: <email@hidden>
> Subject: Re: "as file specification" path syntax for a non-boot drive
>
> Sorry, I wasn't completely clear in my post. I do understand that I
> won't be using "startup disk". I'm also now just hardcoding the path.
> I've found that:
>
> --
> tell application "Finder"
> set gTheDir to "Volumes:200GB:on_demand" as file specification
> end tell
> --
>
> ... works. Thanks for getting me going; your post was helpful.
>
> Bob
>
>
>
>
>
>>> tell application "Finder" to set startup_disk to startup disk as text
>>> global theDir
>>> set gTheDir to startup_disk &
>>> ":Library:QuickTimeStreaming:Movies:on_demand" as file specification
>>>
>>> I need to change the location to another drive. Is the following
>>> the correct syntax?
>>>
>>> set gTheDir to startup_disk & "Volumes:200GB:on_demand" as file
>>> specification
>>
>> --
>>
>> No, because the other drive is not within the startup disk hierarchy.
>>
>> This works:
>>
>> tell application "Finder"
>> set targetDisk to (disk 2 as text)
>> -- or whatever disk number or name you wish
>> end tell
>> set gTheDir to targetDisk & "library" as file specification
>> -- change the folder hierarchy as needed
>>
>> -- Michelle
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> 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:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden