use drag and drop in the Explorer or start the batch manually
@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
set _dir=%~1
if not "%~1"=="" goto checkdir
:ask
echo.All Files will be converted to lowercase
set /p _dir=Directory [%_dir%]:
:checkdir
call :cleandir %_dir%
if "%_dir%"=="" goto ask
if not exist "%_dir%\." (
echo.Directory %_dir% not found!
goto ask
)
echo Dir "%_dir%"
echo.|set /p x=convert Files to lowercase in progress ...
FOR %%V IN ("%_dir%\*") DO (
set _file=%%~nxV
call :convert_to_lowercase _file
echo.|set /p x=.
move "%%~fV" "%%~dpV!_file!"
)
echo.done
goto end
::functions
:convert_to_lowercase
if not defined %~1 goto :EOF
for %%a in ("A=a" "B=b" "C=c" "D=d" "E=e" "F=f" "G=g" "H=h" "I=i" "J=j" "K=k"
"L=l" "M=m" "N=n" "O=o" "P=p" "Q=q" "R=r" "S=s" "T=t" "U=u" "V=v"
"W=w" "X=x" "Y=y" "Z=z" "Ä=ä" "Ö=ö" "Ü=ü"
) do call set %~1=%%%~1:%%~a%%
goto :EOF
:cleandir
dir /AD "%~1" /b >nul 2>&1 && set _dir=%~1\\\\\|| set _dir=%~dp1\\\\\
set _dir=%_dir:\\\\\\=%
set _dir=%_dir:\\\\\=%
goto :EOF
:end
ENDLOCAL