将后缀名为exe的文件转译成自定义后缀名
for /f "delims=" %%a in ('dir /a-d /s /b/on *.exe') do (
echo %%a
echo ----%%~na---
ren %%a %%~na.myexe.zip
)
pause
再将自定义后缀名的文件转回去
for /f "delims=" %%a in ('dir /a-d /s /b/on *.myexe.zip') do (
echo %%a
echo ----%%~na---
echo ----%%~xa---
ren %%a %%~na
)
for /f "delims=" %%a in ('dir /a-d /s /b/on *.myexe') do (
echo %%a
echo ----%%~na---
echo ----%%~xa---
ren %%a %%~na.exe
)
pause