批处理将文件名大写改为小写

@echo off  
setlocal
setlocal ENABLEDELAYEDEXPANSION
set path="D:\Program Files\MATLAB\toolbox\sheffield_gatool\sheffield_gatool"#文件夹路径
set suf="*.m"#文件后缀
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

你可能感兴趣的:(Window小技巧)