Re: What is the best way to get the name (without the extension) of a file?
Re: What is the best way to get the name (without the extension) of a file?
- Subject: Re: What is the best way to get the name (without the extension) of a file?
- From: "Mark J. Reed" <email@hidden>
- Date: Wed, 4 May 2005 11:03:15 -0400
On 5/4/05,
Michelle Steiner <
email@hidden> wrote:
"Displayed name" will include the the extension if it is not hidden,
so it won't work in all cases. This is what I came up with:
set Ext_hidden to the extension hidden of the_File
set the extension hidden of the_File to true
set the File_Name to the displayed name of the_File
set the extension hidden of the_File to Ext_hidden
My first instinct would be to use string manipulation on the
filename - convert it to text, set the TID to '.', and if
the resulting list has more than one item, discard the last one.
I am not saying it's better, mind. It's just that temporarily
changing something just for a side effect is something I try to avoid;
never know what might be going on at the same time the script is
running that might get confused by the sudden change in the value of
the extension hidden flag.
--
Mark J. Reed <
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