Re: [Q] How to get a containing folder of a given file?
Re: [Q] How to get a containing folder of a given file?
- Subject: Re: [Q] How to get a containing folder of a given file?
- From: david <email@hidden>
- Date: Wed, 20 Sep 2006 01:27:14 -0400
try:
set dpath to (path to desktop) as string
david in maine
On Sep 20, 2006, at 1:05 AM, JongAm Park wrote:
Hello.
I am trying to get the path of a containing folder of a file.
By looking up the dictionary and some web sites, I found out that
there
was a "containder" property of a file.
However this presents an error message.
tell application "Finder"
set my_file_path to path to desktop folder
-- get container of my_file_path as text
set directory_path to (container of my_file_path)
end tell
I tried "container of file my_file_path" also. I tried converting them
to text or string also. But it displays message like
"Can't make <<class ctnr>> of alias "..........." into type string.
Can anyone please tell me how to solve this problem?
Thank you.
P.S. AppleScript seems to be more difficult than the Objective-C &
Cocoa... :(
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (Applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
40prexar.com
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