How to find and replace a character in filenames in Windows 7 using Explorer?

if you have bulk files of any type and you want to replace certain character with another character, there is some method by which it can be done very fast.

Steps:

  1. create a vbs file, “rename_underscores.vbs”
  2. copy and paste this code inside that file:

Set objFso = CreateObject(“Scripting.FileSystemObject”)
Set Folder = objFSO.GetFolder(“D:\downloads\pdf”)

For Each File In Folder.Files
sNewFile = File.Name
sNewFile = Replace(sNewFile,”—“,” “)
if (sNewFile<>File.Name) then
File.Move(File.ParentFolder+”\”+sNewFile)
end if

Next

3. change the location of the folder where you want to rename files in line 2 of code

That’s it. Let us know if you have any issue. comment here.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Stay in Touch

Related Articles