Removing special Characters in File names

Zoom 33.6k/14.4 v34 pnp win/dos
August 25, 2009 at 14:35:13
Specs: Windows XP
I attempting to remove any "," (commas) in the file names which I have thousands of files names that have this special character. Here is an example-
AK0031AA 1976-06-21 NEW CONSTRUCTION - CIVIL - EXCAVATION AND UTILITIES, EXCAVATION ELEVATIONS (C 3 1) 01806

Any ideas how I can do this on an entire directory C:\Scans that holds all these different files?

Thanks.

Tom

tom.baker@gsa.gov


See More: Removing special Characters in File names

Report •


#1
August 25, 2009 at 17:11:02
Q&D VBScript:
Const folder = "." 'The full path of the folder with the files you want to change 
                   'ex: "c:\Documents And Settigns\you\yourstuff"
With CreateObject("Scripting.FileSystemObject")
  On Error Resume Next
  For Each file In .GetFolder(folder).Files
    file.Name = Replace(file.Name, ",", "")
  Next 'file
End With 'FSO


Report •
Related Solutions


Ask Question