Re: RegExps in AS
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