• 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: What is the best way to get the name (without the extension) of a file?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: Fri, 6 May 2005 14:13:09 -0400

Uhm, you asked for other ways to do it.  We obliged.  So now you're complaining? :)  If you think your way is better than the alternatives, great!  Keep using it!


On 5/6/05, Michelle Steiner <email@hidden> wrote:
On May 6, 2005, at 2:37 AM, Nathan Day wrote:

how about

set fileName to "com .apple.iTunes.eq.plist"
if ( offset of "." in fileName) > 0 then
    set { theOldDelimieter, text item delimiters} to { text item delimiters, "."}
    set fileName to (text items 1 thru -2 of fileName) as string
    set text item delimiters to theOldDelimieter
end if
fileName

Why is everyone so focused on manipulating the string?  What's the matter with my original idea:

set the_File to ( choose file)
tell application "Finder "
    set extension_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 extension hidden of the_File to extension_hidden
end tell
the File_Name

-- Michelle

--
Nobody ever procrastinated their way to the top.


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (




--
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

  • Follow-Ups:
    • Re: What is the best way to get the name (without the extension) of a file?
      • From: Michelle Steiner <email@hidden>
References: 
 >Re: What is the best way to get the name (without the extension) of a file? (From: "John C. Welch" <email@hidden>)
 >Re: What is the best way to get the name (without the extension) of a file? (From: Nathan Day <email@hidden>)
 >Re: What is the best way to get the name (without the extension) of a file? (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Illustrator save as PDF; adding extra bleed?
  • Next by Date: Re: How to use the "Find" command in Tiger Finder?
  • Previous by thread: Re: What is the best way to get the name (without the extension) of a file?
  • Next by thread: Re: What is the best way to get the name (without the extension) of a file?
  • Index(es):
    • Date
    • Thread