I need some help Please
Posted: 23 Jan 2019 20:08
This is a script I found that works Great cept one thing. Can someone help me change the Underscore to an open space or whitespace i think it is called????
Code: Select all
@echo off
setlocal EnableDelayedExpansion
:: remove variables starting $
For %%b IN ($) DO FOR /F "delims==" %%a In ('set %%b 2^>Nul') DO SET "%%a="
FOR %%a IN (0 1 2 3 4 5 6 7 8 9 a b c d e f) DO (
FOR %%b IN (0 1 2 3 4 5 6 7 8 9 a b c d e f) DO (
SET "$%%a%%b=%%%%a%%b"
)
)
for /f "delims=" %%I in ('dir /b /a-d^| find "%%"') do (
SET "var1=%%I"
FOR /f "tokens=2delims==" %%x IN ('set $') DO SET "var1=!var1:%%x=_"!"
IF "%%I" neq "!var1!" REN "%%I" "!var1!"
)
GOTO :EOF