• 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: Dumb Finder scripting question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dumb Finder scripting question


  • Subject: Re: Dumb Finder scripting question
  • From: Michelle Steiner <email@hidden>
  • Date: Fri, 14 Dec 2007 19:35:06 -0700

On Dec 14, 2007, at 7:13 PM, Mark J. Reed wrote:

No, I did not use pipes.  And if I had, I would have noticed the "cannot get |extension hidden| of blah" or whatever error dialog, and would have tracked that down before simply reporting tersely that your technique "doesn't work".    The pipes were just by way of quoting within my message text; I'm kind of a fan of the whole use/mention distinction.  I should have just stuck with quotes, but then you might have asked if I really used the quotes, so it might not have helped. Parens!  I'll use parens. 

No, I wouldn't have asked about quotes, because that's a normal use for them.

Laine also said something in this thread about that technique not working reliably anymore.  It's apparently sensitive to the specific extension?  

Hmm, I've never had it fail on me.

In any case,  (text 1 through -5 of name) works well enough.

So long as the extension is always three characters, which, if you're using it only on .avi files, it would be.

Here's a more generic solution that takes into account the possibility of having more than one period in the file name, and that will work with a name extension of any length.  The script must first check to see whether there is a name extension before calling this routine

set text item delimiters to ""
set foo to "abc.def.123"
set foo to reverse of characters of foo as text
set text item delimiters to "."
set foo to rest of text items of foo as text
set text item delimiters to ""
set foo to reverse of characters of foo as text

-- Michelle

-- 
Sex is a lot like bridge. If you don't have a good partner, then you'd better have a good hand.


 _______________________________________________
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

  • Follow-Ups:
    • Re: Dumb Finder scripting question
      • From: Laine Lee <email@hidden>
References: 
 >Re: Dumb Finder scripting question (From: Paul Berkowitz <email@hidden>)
 >Re: Dumb Finder scripting question (From: Michelle Steiner <email@hidden>)
 >Re: Dumb Finder scripting question (From: "Mark J. Reed" <email@hidden>)
 >Re: Dumb Finder scripting question (From: Michelle Steiner <email@hidden>)
 >Re: Dumb Finder scripting question (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: Dumb Finder scripting question
  • Next by Date: Re: Dumb Finder scripting question
  • Previous by thread: Re: Dumb Finder scripting question
  • Next by thread: Re: Dumb Finder scripting question
  • Index(es):
    • Date
    • Thread