• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Extract Folder Name from Full Path
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: Extract Folder Name from Full Path (From: Deivy Petrescu <email@hidden>)

  • Prev by Date: Re: Bug in QXPScriptingAdditions.osax?
  • Next by Date: Re: A bug in command completion!
  • Previous by thread: Re: Extract Folder Name from Full Path
  • Next by thread: Re: applescript-users digest, Vol 3 #1930 - 17 msgs
  • Index(es):
    • Date
    • Thread