• 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: Thu, 5 May 2005 00:01:18 -0400

Better how?  Easier, maybe, if you come from a UNIX background.  More tersely, sure.  But more efficiently?  I dunno. Something you have to check on a case by case basis, I think.  Certainly a compiled executable like sed is faster at doing string manip than either the shell or AS, but you have to get to a point where that matters more than the startup overhead.


On 5/4/05, John C. Welch <email@hidden> wrote:
On 5/4/05 21:50, "Mark J. Reed" <email@hidden> wrote:

> But this sort of string manipulation is probably best done within AppleScript
> itself.  There are things that AS is so slow at doing that the extra overhead
> of running the shell and then a program from the shell is worth it, but I
> don't think stripping the extension off a filename is one of those things. :)

It's pretty hard to find anything beyond very simple string manipulation
that isn't better handled via do shell script.

--
"With over 50 cars already on sale here, the Japanese auto industry isn't
likely to carve out a big slice of the U.S. market for itself."

commentary in Business Week magazine, 1968

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

This email sent to email@hidden



--
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: "John C. Welch" <email@hidden>
References: 
 >Re: What is the best way to get the name (without the extension) of a file? (From: "Mark J. Reed" <email@hidden>)
 >Re: What is the best way to get the name (without the extension) of a file? (From: "John C. Welch" <email@hidden>)

  • Prev by Date: Re: Getting filename without extension...
  • Next by Date: Re: Getting filename without extension...
  • 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