Du kan bruge dette VBS-script:
Dim fso
Dim folder
Dim newfilename, oldfilename
Dim newext, oldext
Dim yourfolder
yourfolder = "D:\\test"
newext = "php"
Set fso = CreateObject("Scripting.FileSystemObject")
Set folder = fso.GetFolder(yourfolder)
For Each file In folder.Files
oldfilename = fso.GetFileName(file)
oldext = Right(oldfilename,4)
If oldext = ".txt" Then
newfilename = LEFT(oldfilename,INSTR(oldfilename,".")) &newext
fso.MoveFile folder &"\\" &oldfilename, folder &"\\" &newfilename
End if
Next
Du skal bare ændre variablen yourfolder, til den mappe du har filerne liggende i, den tager også aller undermapperne med.
MvH
Stefan Svensson
http://fusket.frac.dk