Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Robocopy script that monitors and sync new and modified files?

1 Week Ago   #1
peter7277

Windows 7 Ultimate x64
 
 
Robocopy script that monitors and sync new and modified files?

I need a robocopy script that will run on startup and monitor for modified and new files in specified directories and sync these files instantly when they are detected. How the script will look like? I hope some more advanced user can help me with the code.


My System SpecsSystem Spec
.
1 Week Ago   #2
samuria

win 8 32 bit
 
 

Simple robocopy c:\data d:\data /mir that mirrors data to other drive
My System SpecsSystem Spec
1 Week Ago   #3
peter7277

Windows 7 Ultimate x64
 
 

I made this script:

Code:
@echo off

robocopy c:\data d:\data /mir
and when i run the script it copy the directory and then exits, and i want the script to run constantly and monitor for changes. Is that possible?

edit: I found how to make the script to run constantly - by using the /mon:1 parameter. But now the problem is that command prompt window stays open. Is there way to make the script to run without opening the command prompt window?
My System SpecsSystem Spec
.

1 Week Ago   #4
johnhoh

Win7 pro x64
 
 

Quote   Quote: Originally Posted by peter7277 View Post
Is there way to make the script to run without opening the command prompt window?
SilentCMD
GitHub - stbrenner/SilentCMD: SilentCMD executes a batch file without opening the command prompt window.
My System SpecsSystem Spec
1 Week Ago   #5
peter7277

Windows 7 Ultimate x64
 
 

Thanks, for the script. I also found that i can start .cmd script hidden with autohotkey script.

But i have another issue. I am trying to monitor the files in two directories and i have these lines:

Code:
robocopy e:\dir1 e:\dir1 /mir /mon:1
robocopy e:\dir2 e:\dir2 /mir /mon:1
but when i start the script it monitors only the first directory and not second. Why is that?
My System SpecsSystem Spec
Reply

 Robocopy script that monitors and sync new and modified files?




Thread Tools




Similar help and support threads
Thread Forum
ROBOCOPY - Create Backup Script
How to Create a Backup Script using ROBOCOPY Command There are many paid and free software solutions available to backup critical data and files on a computer system. Many users, however, are unaware of an inbuilt Windows 7 command called ROBOCOPY (Robust File Copy) that allows users to...
Tutorials
Robocopy Script For Incremental, Differential and Full Backup
Dears, Anobody can help me to have a backup script that will help for backup requirement, Please see the details below My Source Directory is "D:\Source" My Destinationa Directory is "\\Server\Destination" I need to meet the following (1) Need to take fullbackup on every Friday ? For this...
General Discussion
my backup script using robocopy
robocopy /S /E /MOV %USERPROFILE%\Documents\ G:\backup\Documents\ robocopy /S /E /MOV %USERPROFILE%\Pictures\ G:\backup\Pictures\ robocopy /S /E /MOV %USERPROFILE%\Downloads\ G:\backup\DownloadS\ robocopy /S /E /MOV %USERPROFILE%\Favorites\ G:\backup\Favorites\ robocopy /S /E /MOV...
Backup and Restore
robocopy script is not working through Scheduler
Dear All, My batch file of robocopy is working fine. But when I tried to run it through task scheduler, none of the files transfer to the target location. @echo off echo +-----------------------------------------+ echo Database Export Utility for server ...
General Discussion
Backing up files using Robocopy
The default copy switch of robocopy is /COPY:DAT if you don't specify any copy options. This is the code I'm using: robocopy C:\ D:\Backup RAMDisk.img /copyall /R:5 /W:15 /V /log:D:\Users\Kevin\Desktop\robocopy_log.txt The RAMDisk.img file that I'm copying is a compressed image file. Now with...
Backup and Restore


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 01:17.
Twitter Facebook