Quote:
Originally Posted by antonye Save this as "rename.vbs" in the target directory. Edit it so that the sPath is the name of the folder, and the sExt is the name of the extension you wish to check (to filter for just .gif files, for example). Double click it in Windows Explorer and it should do the trick. -- 8< -- cut here -- 8< -- sPath = "c:\temp\folder\" sExt = ".gif" Set fsoObject = CreateObject("Scripting.FileSystemObject") Set fsoFolder = fsoObject.GetFolder(sPath) for each fsoFile in fsoFolder.Files if (Right(fsoFile.Name, Len(sExt)) = sExt) then sNewName = Replace(fsoFile.Name, ".", "_rev1.") fsoFile.Name = LCase(sNewName) end if next Set fsoFolder = Nothing Set fsoObject = Nothing |
Cheers for that.... as Phil says, I'll try it on something simple first.....!
Martin