本文主要是介绍xcopy实现电脑文件自动备份,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
脚本
@echo off
set hour=%time:~0,2%
if “%time:~0,1%”==" " set hour=0%time:~1,1%
set now=%Date:0,4%-%Date:5,2%-%Date:~8,2%
@echo %now%
set src_files1=D:\cardImage
set des_files1=D:\新建文件夹
set src_files2=D:\databasebackup
set des_files2=D:\新建文件夹
@echo src_files1 backup
xcopy %src_files1% %des_files1% /e/I/Y
@echo src_files2 backup
xcopy %src_files2% %des_files2% /e/I/Y
@echo on
这篇关于xcopy实现电脑文件自动备份的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!