• 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: File Name Change
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: File Name Change (From: "Dustin Bell" <email@hidden>)

  • Prev by Date: Re: File Name Change
  • Next by Date: An alternative to "sort" & "uniq"
  • Previous by thread: Re: File Name Change
  • Next by thread: Re: File Name Change
  • Index(es):
    • Date
    • Thread