windows cmd 批处理将文件名改为大写:https://blog.csdn.net/llq108/article/details/47185279

@echo off

setlocal

setlocal ENABLEDELAYEDEXPANSION

set path="C:\Users\Administrator\Desktop\flags"

set suf="*.png"

rem %path% #使用变量

for /f "delims=" %%i in ('dir /b/s/a-d %path%\%suf%') do (
  
    set h="%%~ni"
  
    for %%j in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do set h="!h:%%j=%%j!"
 
    ren "%%i" "!h!"%suf%

)

endlocal

你可能感兴趣的:(windows,cmd)