Re: Get only the name of the file, instead of the whole path!
Re: Get only the name of the file, instead of the whole path!
- Subject: Re: Get only the name of the file, instead of the whole path!
- From: Ed Stockly <email@hidden>
- Date: Wed, 16 Jan 2008 20:02:19 -0800
you forgot to reset the AppleScript's text item delimiters to its original value, this may give very odd results ;-)
I always set TIDs just before I use them, so when I do get odd results I know it's something else.
Don't file objects have a "name" property that is exactly what the OP is looking for? Is that only in the Finder?
It is in the Finder, System Events and possibly a few other applications or scripting additions.
However, using TID's doesn't require any other application or scripting addition and eliminates any overhead associated with apple event calling an app or SA.
If you're working with a large number of files using TIDs to pull the name from a file path is much faster.
Text Item Delimiters are our friends.
ES =
|
_______________________________________________
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