Batch Script - Replace From Filenames " " By Space

By: Evo
February 2, 2012

@echo off
setlocal EnableDelayedExpansion

for /f %%a in ('dir /b /s ^| find " "') do (
set FName="%%a"
set FName=!FName:% =% !

rem Tryed using ren but didn't work
rem must be something to do with the %
rem delimeter, so used move.

move "%%a" !FName!
echo Done!

Need more help?
Describe your Problem
Example: Hard Drive Not Detected on My PC

Ask Question