Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Use a Script to Rename All the Files in a FolderContent of Use a Script to Rename All the Files in a Folder.vbsMD5 Hash: CBC39A4B58C9FD172B8D443F0664071B |
||
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colFileList = objWMIService.ExecQuery _ ("ASSOCIATORS OF {Win32_Directory.Name='C:\Logs'} Where " _ & "ResultClass = CIM_DataFile") For Each objFile In colFileList strNewName = objFile.Drive & objFile.Path & "pl-" & _ objFile.FileName & "." & objFile.Extension errResult = objFile.Rename(strNewName) Next | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |