大家在WIN7下面,用什么软件做程序备份
之前我在XP下面写了一个BAT 现在移过来,死活不行了。
@echo off
@echo 请等待......
if exist "Debug\*.exe" (
copy "Debug\*.exe"
)
if exist "Debug" ^
rd "Debug" /s /q
if exist "ipch" ^
rd "ipch" /s /q
@echo Clear KIEL .bak .plg .lst .obj .dbk .m51 .lnp........
rem KIEL------------------------------------------------------------
@echo Being Cleared *.bak
for /r . %%i in (*) do if /i "%%~xi"==".bak" del /a/q/f "%%i"
@echo Being Cleared *.plg
for /r . %%i in (*) do if /i "%%~xi"==".plg" del /a/q/f "%%i"
@echo Being Cleared *.lst
for /r . %%i in (*) do if /i "%%~xi"==".lst" del /a/q/f "%%i"
@echo Being Cleared *.obj
for /r . %%i in (*) do if /i "%%~xi"==".obj" del /a/q/f "%%i"
@echo Being Cleared *.dbk
for /r . %%i in (*) do if /i "%%~xi"==".dbk" del /a/q/f "%%i"
@echo Being Cleared *.m51
for /r . %%i in (*) do if /i "%%~xi"==".m51" del /a/q/f "%%i"
@echo Being Cleared *.lnp
for /r . %%i in (*) do if /i "%%~xi"==".lnp" del /a/q/f "%%i"
@echo Being Cleared ...
for /r . %%i in (*) do if /i "%%~xi"==".sheji-a4" del /a/q/f "%%i"
rem VS2010------------------------------------------------------------
@echo Being Cleared *.sdf
for /r . %%i in (*) do if /i "%%~xi"==".sdf" del /a/q/f "%%i"
@echo Being Cleared *.pch
for /r . %%i in (*) do if /i "%%~xi"==".pch" del /a/q/f "%%i"
@echo Being Cleared *.pdb
for /r . %%i in (*) do if /i "%%~xi"==".pdb" del /a/q/f "%%i"
@echo Being Cleared *.tlog
for /r . %%i in (*) do if /i "%%~xi"==".tlog" del /a/q/f "%%i"
@echo Being Cleared *.idb
for /r . %%i in (*) do if /i "%%~xi"==".idb" del /a/q/f "%%i"
@echo Being Cleared *.obj
for /r . %%i in (*) do if /i "%%~xi"==".obj" del /a/q/f "%%i"
@echo Being Cleared *.res
for /r . %%i in (*) do if /i "%%~xi"==".res" del /a/q/f "%%i"
@echo Being Cleared *.ilk
for /r . %%i in (*) do if /i "%%~xi"==".ilk" del /a/q/f "%%i"
@echo Being Cleared *.log
for /r . %%i in (*) do if /i "%%~xi"==".log" del /a/q/f "%%i"
@echo Being Cleared *.ipch
for /r . %%i in (*) do if /i "%%~xi"==".ipch" del /a/q/f "%%i"
rem ------------------------------------------------------------
@echo Being Cleared *.ncb
for /r . %%i in (*) do if /i "%%~xi"==".ncb" del /a/q/f "%%i"
@echo Being Cleared *.opt
for /r . %%i in (*) do if /i "%%~xi"==".opt" del /a/q/f "%%i"
rem ------------------------------------------------------------
setlocal enabledelayedexpansion
if not exist BackUp md BackUp
rem set path=%path%;%programfiles%\winrar
rem set path=%path%;C:\Program Files (x86)\WinRAR
rem 采用上面路径方法或是下面将RAR.EXE 复制到系统目录下面
rem 必须先装WINRAR压缩软件 此例以RAR.EXE 3.93版本
rem if not exist "C:\WINDOWS\rar.exe" copy "C:\Program Files\WinRAR\rar.exe" "C:\WINDOWS"
rem rar a /r -e-s ^
rem "BackUp\%date:~0,10%_%time:~0,2%-%time:~3,2%_KEIL422.dj" "Software"
rem Backup1.exe
rem Backup2.exe
rem pause
exit
rem ---->ms 1S=1000 pause<----
|