适合虚拟主机商的一键批量备份用户网站数据的批处理
时间:2021-01-14 11:13:26|栏目:DOS/BAT|点击: 次
把以下代码另存为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%
复制代码 代码如下:
: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%