备份(.txt)文件从一个目录到另一个目录每2分钟 [英] backup (.txt)files from one directory to the other for every 2 min

查看:106
本文介绍了备份(.txt)文件从一个目录到另一个目录每2分钟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有.txt文件在

C:\ Users \Documents \ Backup



i想要将它们备份到其他目录每2分钟

C:\ Users \Documents \ArchiveUp



谁能告诉我怎么办? ?

i have .txt files in
C:\Users\Documents\Backup

i want to backup them to other directory for every 2 minutes
C:\Users\Documents\ArchiveUp

could anyone tell me how can i do it??

推荐答案

有关时间的请看 Windows任务计划程序 [ ^ ]



至于复制它们的脚本,有很多可用的例子,例如请参阅此帖 [ ^ ]
For the timing have a look at the Windows Task Scheduler[^]

As for the script to copy them, there are numerous examples available e.g. see this post[^]


如果您不想使用任务计划程序,请使用 robocopy 的MOT选项:

If you don't want to use the Task Scheduler, use robocopy's "MOT" option:
robocopy:



/ MOT:m :: MOnitor源;再次在 m 分钟内运行时间,如果更改。


/MOT:m :: MOnitor source; run again in m minutes Time, if changed.




robocopy "C:\Users\Documents\Backup" "C:\Users\Documents\ArchiveUp" /MIR /MOT:2



在Robocopy中指定复制计划 [ ^ ]


脚本可能类似于(.bat或.cmd文件):

The script could be something like (.bat or .cmd file):
@echo off
robocopy "C:\Users\Documents\Backup" "C:\Users\Documents\ArchiveUp" /MIR



你可以通过输入 robocopy /?找到更多robocopy程序选项。



然后你可以使用Windows任务计划程序每两分钟安排执行一次脚本。


You can find more options for robocopy program by simply typing robocopy /?.

Then you can use the Windows Task Scheduler to schedule the execution of the script every two minutes.


这篇关于备份(.txt)文件从一个目录到另一个目录每2分钟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆