Re: Replace characters in filename
Re: Replace characters in filename
- Subject: Re: Replace characters in filename
- From: Christopher Stone <email@hidden>
- Date: Sat, 12 Jun 2004 17:31:05 -0500
At 16:51 -0400 06/12/2004, Graff wrought:
How would I find certain characters (any of a list of 13) in a filename
and replace them with one common character?
...
property disallowedCharacters : "1234567890ABCD"
property replacementCharacter : "!"
I thought I'd throw in a plug for the Satimage osax's regular expressions.
set someFileName to "aGraphicsFile001A.jpg"
set newFileName to change "[0-9ABCD]" into "" in someFileName with
regexp and case sensitive
--> aGraphicsFile.jpg
Chris
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.