|
|
本帖最后由 pcl_test 于 2016-5-13 20:08 编辑
我的批处理脚本:
@cd /d %~dp0
@call :del_result test_mr
@call :del_result test20caps
pause
:del_result
if exist %1%.cdt.bak (
echo =====del result file of %1%=====
del %1%.cdt
del %1%.idx
rename %1%.cdt.bak %1%.cdt
)
执行后:(见最后一个rename命令,为什么展开后成这样?)
D:\MyProg\IDP1.4_20160510\log>call :del_result test_mr
D:\MyProg\IDP1.4_20160510\log>if exist test_mr.cdt.bak (
echo =====del result file of test_mr=====
del test_mr.cdt
del test_mr.idx
rename test_mr1.cdt
)
D:\MyProg\IDP1.4_20160510\log>call :del_result test20caps
D:\MyProg\IDP1.4_20160510\log>if exist test20caps.cdt.bak (
echo =====del result file of test20caps=====
del test20caps.cdt
del test20caps.idx
rename test20caps1.cdt
)
=====del result file of test20caps=====
找不到 D:\MyProg\IDP1.4_20160510\log\test20caps.cdt
找不到 D:\MyProg\IDP1.4_20160510\log\test20caps.idx
命令语法不正确。
D:\MyProg\IDP1.4_20160510\log>pause
请按任意键继续. . . |
评分
-
查看全部评分
|