将本地windows文件夹备份到远程FTP脚本并删除远程
脚本:
@echo offecho.cd E:\backup\set time_hh=%time:~0,2%if /i %time_hh% LSS 10 (set time_hh=0%time:~1,1%)set filename=%date:~,4%%date:~5,2%%date:~8,2%_%time_hh%%time:~3,2%%time:~6,2%set /a deldata=filename-7Rar.exe a -m5 -r Mybackup-%filename%.rar @backup.lst.txtmkdir local_backup echo open 192.168.11.250 >ftp.txtecho ftpusserxxx>>ftp.txtecho xxxxx>>ftp.txtecho binary>>ftp.txtecho lcd E:\backup>>ftp.txtecho prompt>>ftp.txtecho mput Mybackup-%filename%.rar >>ftp.txtecho mdelete Mybackup-%deldata%*.rar >>ftp.txtecho close>>ftp.txtecho bye>>ftp.txtftp -s:ftp.txt move E:\backup\Mybackup-%filename%.rar E:\backup\local_backupecho.--------------------- 作者:rootfriday 来源:CSDN 原文:https://blog.csdn.net/rootfriday/article/details/79931999 版权声明:本文为博主原创文章,转载请附上博文链接!
我将Rar执行文件放到同一目录
设置定时调用bat脚本
(注:Rar.exe的话,我是直接拷贝的电脑中的)