Windows backup file plan

Life is a good backup habits
1.Win + R input taskschd.msc
Here Insert Picture Description
2. Click on the right side to create a task
Right-create a task
3. Set up a scheduled task name
first name
4. Click the Triggers tab and click the New button
trigger
5. New Trigger, this set their own wave, click OK
Here Insert Picture Description
6. click the Actions tab, click New Likewise, after the program or script column write "E: \ E disk backup software directory .bat"
Here Insert Picture Description
Here Insert Picture Description
this is the code backup file

@echo off & title 备份目录 By 小可爱
color 0a & cd /d %~dp0
 
::设置要备份的主目录
set SrcDir=E:\YIMA
 
::设置备份保存主目录
set SavDir=E:\备份YIMA
 
::设置备份前是否清空保存目录,是 = 1 ,否 = 0
set DelIt=1
 
if exist "%SavDir%" (
    if %DelIt% equ 1 (
        echo 正在清空备份保存目录 "%SavDir%",请稍等...
        rd /s /q "%SavDir%"
    )
)
 
echo, & echo 正在备份目录 "%SrcDir%",请稍等...
xcopy /s/e/h "%SrcDir%" "%SavDir%\"
 
echo, & echo 备份完成。
ping 127.0.1 -n "4">nul
exit

Guess you like

Origin blog.csdn.net/AdminPwd/article/details/93159534