hi,
I am trying to get a batch file to change the file name to upper case. I found some code to change upper to lower. I dont know anything about coding![]()
I am looking for two code, one is to "change file name to upper case. Example :myfile" should be "MYFILE"
another is change the starting later of file name to upper case. Example :myfile" should be "Myfile"
code to change to lower case:
[VBA]@echo off
if .%1==./? (
echo Changes all filenames in the given dir to lowercase
echo.
echo %~n0 dir [/s]
echo.
echo dir The directory.
echo /s Include subdirectories of 'dir'.
goto :EOF)
setlocal
pushd %1
if .%2==. (
set DIRCMD=/L/B
echo Rename all filenames in %1 to lowercase filenames?&goto :Anykey
) else if /i .%1==./S (
set DIRCMD=/L/B/S/A-D
echo Rename all filenames in %1 and its subdirs to lowercase filenames?&goto :Anykey
) else (
echo Invalid switch: %*&goto :End)
:Anykey ---------------------------------------------------------------
for /f "tokens=*" %%F in ('dir/s') do move "%%F" "%%F"
:End ------------------------------------------------------------------
popd&endlocal&goto :EOF[/VBA]