Re: File Name Change
Re: File Name Change
- Subject: Re: File Name Change
- From: Matthew Smith <email@hidden>
- Date: Mon, 18 Apr 2005 17:33:26 +1000
on 18/04/2005 16:58, Dustin Bell at email@hidden wrote:
> I am confused. Is the WT in the file name? If you delete the name of the
> file then you don't have a file name.
> Are you wanting to change any occurrence of GT in file names to Greeley?
>
> Matthew Smith
> --
> Sorry Matt I should have made myself clearer, the File names are WT001,
> WT002, WT003 etc I just want it to be 001, 002, 003 and yes I am wanting to
> change any occurrence of the letters GT in file names to Greeley.
Here's how to do the first bit:
set theFolder to choose folder
tell application "Finder"
set fileList to every file in theFolder whose name starts with "WT"
repeat with oneFile in fileList
set oldName to name of oneFile
set newName to text 3 thru -1 of oldName
set name of oneFile to newName
end repeat
end tell
--
Matthew Smith
_______________________________________________
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