это путь в VBScript
Dim objFSO,myFolder,objFolder,colFiles,objFile,newName,i,n
set sh=createobject("wscript.shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
myFolder = "C:\users\eng\desktop\Scripts" '' here you can write the path for your folder
Set objFolder = objFSO.GetFolder(myFolder)
Set colFiles = objFolder.Files
i=0:n="0000"
For Each objFile in colFiles
if Not instr(1,objFile.name,"YTL.MSZSH1.ch1.",1) > 0 then ''check if the file name change.this step to avoid change file name again after we rename
newName=replace(objFile.Name,"TTFILE-","YTL.MSZSH1.ch1.") ''replace "TTFILE-" with "YTL.MSZSH1.ch1." in the file name
newName=replace(newName,right(newName,4),"_"&n&"."&n&".dat") ''replace in modefiy newName ".dat" to "_0000.0000.dat" in the file name
objFSO.getfile(objFile).name=newName ''change the file name with newName
sh.popup objfile,1,"In_The_Name_Of_Allah"
i=i+1
If i < 10 Then
n= CStr("000" & i)
ElseIf i < 100 Then
n= CStr("00" & i)
ElseIf i < 1000 Then
n= CStr("0" & i)
Else
n= i
End If
End If
Next
wscript.quit