REM start to clean
echo Start to clean all bin and obj folder under Noodle repo
@echo on
@for /d /r %%c in (obj) do @if exist "%%c" (@rd /s /q "%%c" & echo Delete %%c)
@for /d /r %%c in (bin) do @if exist "%%c" (@rd /s /q "%%c" & echo Delete %%c)
pause
echo Start to clean all bin and obj folder under Noodle repo
@echo on
@for /d /r %%c in (obj) do @if exist "%%c" (@rd /s /q "%%c" & echo Delete %%c)
@for /d /r %%c in (bin) do @if exist "%%c" (@rd /s /q "%%c" & echo Delete %%c)
pause
相关命令:
@ 不打印本命令
echo on|off 打开|关闭后面命令的显示
set 设置参数或环境变量
goto 跳转
pause 暂停程序,界面显示“请按任意键继续……”
程序中比较复杂的命令只有一条:
@for /d /r %%c in (.svn) do @if exist %%c ( rd /s /q %%c & echo 删除目录%%c)
for /r 循环遍历当前目录,/d指定遍历的是目录而不是文件,目录名为.svn;if exist先检查目录存不存在,存在则执行删除(rd)操作,并打印删除信息。