Click here to Skip to main content
15,885,914 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to create an automatic backup for all (.txt) files from one directory to the other at time interval of 2min.It means it should create automatic backup for every two minutes
i have used
XCOPY /E /H "C:\Users\Documents\Backup" "C:\Users\Documents\ArchiveUp\".
i need to set time stamp

could anyone plese help me?
Posted

create batch file with your commands and schedule it using task scheduler
check http://stackoverflow.com/a/13173752/2558060[^]
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 2-Dec-15 16:44pm    
Agree, a 5.
—SA
DamithSL 2-Dec-15 21:49pm    
Thank You SA
I would use robocopy for that task.

DamithSL solution is a good one, you should rely on built-in task scheduler to launch your batch regularly.

robocopy /?

in a console should give you plenty of details about differents options.
Robocopy will allow you to copy only modified and newer files; already-copied and unmodified files will not be copied again and again, which depending on your folder size can save a lot of time.

Hope this helps.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900