asked on
Set oFS = CreateObject("Scripting.FileSystemObject")
Set oFolder = oFS.GetFolder("C:\PATH")
For Each oFile In oFolder.Files
WScript.Echo oFile.name
WScript.Echo oFile.path
If Left(Lcase(oFile.name),8) = "q-images" Then
oFS.CopyFile oFile.path, "C:\PATH\" & Right(oFile.name,Len(oFile.name) - 7)
End If
Next
ASKER
VBScript (Visual Basic Scripting Edition) is an interpreted scripting language developed by Microsoft that is modeled on Visual Basic, but with some important differences. VBScript is commonly used for automating administrative and other tasks in Windows operating systems (by means of the Windows Script Host) and for server-side scripting in ASP web applications. It is also used for client-side scripting in Internet Explorer, specifically in intranet web applications.
TRUSTED BY
setlocal enabledelayedexpansion
CD/d "C:\myfolder"
for %%F in (Q-Images*.TIF) do (
set _FN=%%F
ren "!_FN!" "!_FN:~8!"
)