WatchDirectory Forum
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl
watchDirectory forums >> Plugins >> Monitor multiple locations with the same task
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl?num=1470402832

Message started by TonyF on Aug 5th, 2016 at 3:13pm

Title: Monitor multiple locations with the same task
Post by TonyF on Aug 5th, 2016 at 3:13pm
It would be very useful for WatchDirectory to be able to monitor multiple locations with the same task. For example, we want to be able to monitor a folder of the C: drive on multiple (8) instrument PCs and copy certain files to a network data share where the files will be secured and available for backup.

Currently, we will need to develop a task for one of the PCs and then make 7 copies of the task, which are then individually configured to monitor folders on the other PCs. Obviously this takes 8 tasks which uses up quite a lot of resources on the server where the WatchDirectory program is installed. It would be great if WatchDirectory could poll the 8 locations and run the same task when it detects an event.

Many thanks,

Tony

Title: Re: Monitor multiple locations with the same task
Post by Gert on Aug 6th, 2016 at 12:40pm
That is a great idea and is actually one of the features we will implement in a future major (v5.0) release of WD. No idea (yet) when work will start on that.

Title: Re: Monitor multiple locations with the same task
Post by Verne on Nov 29th, 2016 at 9:19pm

TonyF wrote on Aug 5th, 2016 at 3:13pm:
It would be very useful for WatchDirectory to be able to monitor multiple locations with the same task. For example, we want to be able to monitor a folder of the C: drive on multiple (8) instrument PCs and copy certain files to a network data share where the files will be secured and available for backup.

Currently, we will need to develop a task for one of the PCs and then make 7 copies of the task, which are then individually configured to monitor folders on the other PCs. Obviously this takes 8 tasks which uses up quite a lot of resources on the server where the WatchDirectory program is installed. It would be great if WatchDirectory could poll the 8 locations and run the same task when it detects an event.

Many thanks,

Tony

You could simulate this with a batch file and Windows Task Scheduler.  The Windows task could just be set to repeat itself every minute to simulate checking for new files.

The beginning of the batch could check for the existence of files in the 8 locations.  If there are files in one of the folders then do something, else exit.

Title: Re: Monitor multiple locations with the same task
Post by Verne on Nov 29th, 2016 at 9:26pm
Another option would be to create symbolic links to all 8 computers under one root folder on another computer and then have the task monitor sub directories of the one root folder.

EDIT:
I just tested this and it does work.  I created symbolic links to a folder on the C: drive of all my servers to a folder on my local computer.

On my local computer I created a folder on the C: drive named MyServers.
Then from that folder I ran the MKLINK command for each one of my servers.
[code]C:\MYSERVERS>mklink /D Server1 \\Server1\C$\Folder[/code]

I then setup a Watch Directory task to monitor the MyServers folder and check the box to monitor the sub directories.

Title: Re: Monitor multiple locations with the same task
Post by Gert on Nov 30th, 2016 at 9:10am
Interesting idea...
I bet this only works if you use the "Polling" or "File Age" monitoring method.

Title: Re: Monitor multiple locations with the same task
Post by Verne on Nov 30th, 2016 at 8:28pm

Gert wrote on Nov 30th, 2016 at 9:10am:
Interesting idea...
I bet this only works if you use the "Polling" or "File Age" monitoring method.

I had it set for Default.

We normally using Polling for all of our tasks.  For this test I just set it up real quick without thinking of what we use for our standards.

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