• 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: RegExps in AS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RegExps in AS


  • Subject: Re: RegExps in AS
  • From: John Stewart <email@hidden>
  • Date: Wed, 23 Feb 2005 09:41:03 -0500

On 2/22/05 at 11:34 PM,  the entity kai spoke thusly

>On Monday, February 21, 2005, at 10:25  pm, Ihar 'Philips' Filipau
>wrote:
>
>>
>> On 20 Feb 2005, at 22:02, kai wrote:
>>
>>> One way might be to use AppleScript's text item delimiters:


Or one could do it with nothing but the Finder which doesn't need RegEx or TIDs. This isn't going to set any speed records but it is accurate. It's also easily changed to filter extensions by adding a 'whose' clause.

    --> Cut <--
    tell application "Finder"
        set flist to every file of (choose folder) as alias list
        repeat with aFile in flist
            set temp to contents of aFile
            set oldExt to extension hidden of temp
            set extension hidden of temp to true
            set fname to displayed name of temp
            set extension hidden of temp to false
            set name of temp to fname
            set extension hidden of temp to oldExt
        end repeat
    end tell
    --> Cut <--

Any line in this script which starts at the left margin has been wrapped.
You may need to manually append such a line to the end of the preceeding line if it's a "hard" wrap.

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

References: 
 >Re: RegExps in AS (From: kai <email@hidden>)

  • Prev by Date: Re: Quark 6.5 Page Name of Group Items
  • Next by Date: Re: Quark 6.5 Page Name of Group Items
  • Previous by thread: Re: RegExps in AS
  • Next by thread: Re: RegExps in AS
  • Index(es):
    • Date
    • Thread