# 批量修改前缀和后缀 #
网上真的好难找,贴代码如下:
for /f %%i in ('dir /b *.格式名') do (ren %%i 改为前缀%%i)
for /f %%i in ('dir /b *.格式名*') do ren "%%i" %%~ni改为后缀
for /f %%i in ('dir /b *.nii') do (ren %%i D%%i)
for /f %%i in ('dir /b *.nii*') do ren "%%i" %%~ni_Merge.nii
# 批量修改前缀和后缀 #
网上真的好难找,贴代码如下:
for /f %%i in ('dir /b *.格式名') do (ren %%i 改为前缀%%i)
for /f %%i in ('dir /b *.格式名*') do ren "%%i" %%~ni改为后缀
for /f %%i in ('dir /b *.nii') do (ren %%i D%%i)
for /f %%i in ('dir /b *.nii*') do ren "%%i" %%~ni_Merge.nii