admin

随手写了一个批处理程序,一键备份指定目录文件
代码很简单,不解释,依赖winrar的rar.exe文件。win10测试通过。
扫描右侧二维码阅读全文
22
2017/01

随手写了一个批处理程序,一键备份指定目录文件

代码很简单,不解释,依赖winrar的rar.exe文件。win10测试通过。

@ECHO OFF&PUSHD %~DP0 &TITLE 一键备份
mode con cols=70 lines=20
color 2F
Rd "%WinDir%system32test_permissions" >NUL 2>NUL
Md "%WinDir%System32test_permissions" 2>NUL||(Echo 请使用右键管理员身份运行!&&PAUSE >NUL&&EXIT)
Rd "%WinDir%System32test_permissions" 2>NUL

set /a date=%date:~0,4%%date:~5,2%%date:~8,2%

set /a time=%time:~0,2%%time:~3,2%%time:~6,2%

net stop mysqla

rar a -r -s -ep1 -m1 mysql-%date%-%time%.rar D:phpStudyMySQLdatawordpress_xl

rar a -r -s -ep1 -m1 htdocs-%date%-%time%.rar D:YuFangWebSitewordpress.xl.comhtdocs

net start mysqla

echo 【按任意键退出】

pause>nul exit

Last modification:October 12th, 2018 at 10:47 am
If you think my article is useful to you, please feel free to appreciate

Leave a Comment

captcha
请输入验证码