WatchDirectory Forum
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl
watchDirectory forums >> How to... >> Folder Mirror
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl?num=1107374999

Message started by Enad on Feb 2nd, 2005 at 9:09pm

Title: Folder Mirror
Post by Enad on Feb 2nd, 2005 at 9:09pm
Howdy Gert.

I mentioned long ago that I might set up a mirror folder on a machine in our remote office with it's somewhat slow connection.  Well, it'd be real useful now, and I was wondering if there's anything I might have to watch for?

All I want to do is keep an exact read-only mirror image there that I can update on the as-you-go continual basis.  So any folder or file that gets deleted, added, renamed etc here would happen there shortly after.  (I'm already using WD to do the adding to the database folder and it's working fantastic, though events can also happen from manual processes).

I looked at a couple specific programs, and saw WD advertised for this very purpose :)  So where is the WDAutoMirror.bat file?  Am I in for some hiccups with restarting the service and possibly missing files and getting out of sync?  I do a simply daily backup now with xcopy:
XCOPY H:\PTC\*.* D:\DB_BACK\PTC\ /C/D/E/I/F/H/R/Y/L>D:\DB_BACK\PTC.TXT
XCOPY H:\PTC\*.* D:\DB_BACK\PTC\ /C/D/E/I/F/H/R/Y
Think I might have to run something like this each time before starting the process to verify synchronization?


I still wish the watchdirectory settings for a batch file could be found in the batch file itself.  So for now I just do it manually:

@echo off
@GOTO EndSettings
WDSetting Watched_Dir = "\\server...."
WDSetting FILENEW = Y
WDSetting Hide_WatchDir_Window = Y
........etc.....
:EndSettings

And put it right up at the top of the batch file.  Be cute if the WD Setup GUI could at least read it if not write to it.

Thanks for a great product
Danny

Oh, AFPL Ghostscript 8.50 has been released if you wanted to update WDAutoPs2Pdf.bat



Title: Re: Folder Mirror
Post by Gert on Feb 3rd, 2005 at 5:05am
Hi Enad,


wrote on Feb 2nd, 2005 at 9:09pm:
I still wish the watchdirectory settings for a batch file could be found in the batch file itself.  So for now I just do it manually:

@echo off
@GOTO EndSettings
WDSetting Watched_Dir = "\\server...."
WDSetting FILENEW = Y
WDSetting Hide_WatchDir_Window = Y
........etc.....
:EndSettings

And put it right up at the top of the batch file.  Be cute if the WD Setup GUI could at least read it if not write to it.


Don't hold your breath (it will be 2 months or so), but something like the above will be available in the next release. See http://www.watchdirectory.net/beta (userid watchbeta, password foobar).
This new release will be a free upgrade for most customers (those who purchased less than a year ago).
Thanks for listening to this commercial  :D
Gert

Title: Re: Folder Mirror
Post by Gert on Feb 3rd, 2005 at 5:16am

wrote on Feb 2nd, 2005 at 9:09pm:
I looked at a couple specific programs, and saw WD advertised for this very purpose :)  So where is the WDAutoMirror.bat file?

You should use the wdAutoCopy.bat sample for that.


wrote on Feb 2nd, 2005 at 9:09pm:
Am I in for some hiccups with restarting the service and possibly missing files and getting out of sync?


Yes, that could happen. If WD is not running, it can not monitor the source directory. Your XCOPY solution seems like a good way to handle it.

Alternatively, if you are NOT using the fast monitoring method, you could enable the "fire filenew/dirnew events at startup" option.
This will start your .bat file for all existing files and directories at startup. Inside your .bat file you can check for the %WD_INIT% variable to see if it is set to YES, and then first check if the 'target' file already exists before copying it.

WD version 4 will have a new option (replacement for "fire filenew/dirnew at startup") that will keep track of files that didn't have events fired for them (referenced as 'synchpointing' on the beta page).

Gert

WatchDirectory Forum » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2017. All Rights Reserved.