' Replaces all the blanks in the filename in a folder with "_"
'the folder where the files are stored
Const Map = "C:\Scripts\SearchBlanks"
Set ObjFileSystem = CreateObject("Scripting.FileSystemObject")
Set Folder = ObjFileSystem.GetFolder(Map)
Set Bestanden = Folder.Files
For Each Bestand In Bestanden
If InStr(Bestand.Name, " " ) > 0 Then
Bestand.Name = Replace(Bestand.Name, " ", "_")
End If
Next
Set Bestanden = Nothing
Set Folder = Nothing
Set ObjBestandSysteem = Nothing