Advertisement
Sphexi

Untitled

Sep 29th, 2019
341
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Dim oFileSys,oFolder,aFiles
  2.  
  3. Set oFileSys = CreateObject("Scripting.FileSystemObject")
  4. Set oFolder = oFileSys.Getfolder(oFileSys.GetAbsolutePathName("."))
  5. Set aFiles = oFolder.Files
  6.    
  7. For Each file in aFiles
  8.     If Instr(file.name,"xyz") > 0 Then
  9.         newName = Replace(file.name,"xyz_","")
  10.         File.move(newName)
  11.     End If
  12. Next
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement