|
把以下代码另存为AutoBAK.BAT文件放到你要打包的目录下双击执行即可!非常适合虚拟主机商批量备份用户网站数据
- :Compress
- for /d %%d in (%1.\*.*) do "%ProgramFiles%.\WinRAR\rar" a -r -m0 -inul %1."%%~nxd.rar" "%%~nxd"
- for %%f in (%1.\*.*) do "%ProgramFiles%.\WinRAR\rar" a -r -m0 -inul %1."%%~nf.rar" "%%~nxf"
- del AutoBAK.rar
- MD D:\Bakup\BakUP%date:~0,10%
- move *.rar D:\Bakup\BakUP%date:~0,10%
复制代码
|
|
|
|