Re: Extract Folder Name from Full Path
Re: Extract Folder Name from Full Path
- Subject: Re: Extract Folder Name from Full Path
- From: Emmanuel <email@hidden>
- Date: Mon, 18 Aug 2003 04:18:38 +0200
At 9:49 PM -0400 17/08/03, Deivy Petrescu wrote:
>
set fullpath to (choose folder)
>
tell application "System Events" to get name of folder fullpath
>
>
nothing is returned! SE or Smile.
>
No errors, just no result. Same thing for other properties ( I checked mod date).
>
If one changes "folder" to "item" the the Script throws an error message NSsomething (the usual...)
>
This does not bother the "Finder" which accepts both "item" and "folder" interchangeably.
>
>
Is this a bug? Has this been mentioned before?
>
Is this a feature?!?!
Your expression is bogus (folder alias "blah" is nothing good for me) so I consider the behavior you mention a minor bug. If you make a legal bug such as:
---------------------
set fullpath to (choose folder)
tell application "System Events" to get name of fullpath
---------------------
then you get the dreadful "NS - oh whatever".
That's because SystemEvents prefers file specifications (but not furl's) while Finder is easier with aliases (not a lecture, only my fast observations).
Emmanuel
_______________________________________________
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.