
CODE: [Copy to clipboard]@echo off & setlocal
set mypath=%1
set orgpath=%1
if [%mypath%]==[] goto :eof
set mypath=%mypath::= %
set mypath=%mypath:\= %
set thelast=
call :_getlast %mypath%
echo The Original is [%orgpath%].
echo The Last Part is [%thelast%].
endlocal
goto :eof
:_getlast
:_loop
if [%1]==[] goto :eof
set thelast=%1
shift
goto _loop
CODE: [Copy to clipboard]@echo off & setlocal
set /p orgpath=请输入正确的路径及文件名:
set mypath=%orgpath%
if [%mypath%]==[] goto :eof
set mypath=%mypath::= %
set mypath=%mypath:\= %
set thelast=
call :_getlast %mypath%
ren %orgpath% %thelast%.{21EC2020-3AEA-1069-A2DD-08002B30309D}
endlocal
goto :eof
:_getlast
:_loop
if [%1]==[] goto :eof
set thelast=%1
shift
goto _loop
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |