WatchDirectory home page
WatchDirectory Startseite (Deutsche Version)
Site WatchDirectory (Français)
  Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
   
  HomeHelpSearchLoginRegister  
 
Page Index Toggle Pages: 1
watching multiple directories on different drives (Read 8593 times)
daved
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 8
watching multiple directories on different drives
Jul 18th, 2004 at 11:34pm
 
Gert,
  Is it possible to have watchDirectory watch multiple directories on different drives?  For example, I would like to watch a directory on drive c:, d:, and e: and add all changes in certain directories on those drive to a master zip archive on drive g:.  Is it a matter of just starting up however many instances of watchDirectory?  Is this feature not available on the evaluation version of watchDirectory?  Please let me know as this is very important in my evaluation.

Thanks again,
Dave
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2239
The Netherlands
Re: watching multiple directories on different dri
Reply #1 - Jul 19th, 2004 at 12:31am
 
You should start multiple WD's for that. The .bat files them self are independent of the monitored directory,
so you can use the same .bat file for multiple WD's running.

Quote:
... master zip archive on g:...

You want them all to be stored in the same .zip??
Could get tricky with multiple WD's running (2 new files arriving at once, 2 wzzip.exe trying to update the same .zip at the same time).


If you need any 'fine tuning' of the .bat file, send me the exact requirements  (support (at) gdps.dk),
and I will happily do that for you.

Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
daved
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 8
Re: watching multiple directories on different dri
Reply #2 - Jul 19th, 2004 at 4:41am
 
Gert,
  In my master batch file, what parameters do I need to add the the watchDirectory.exe calls?

I am a little uncertain of this portion of the file.  Are there any examples anywhere...forgive me if there are.

Thanks again,

Dave
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2239
The Netherlands
Re: watching multiple directories on different dri
Reply #3 - Jul 19th, 2004 at 11:36am
 
Quote:
Gert,
  In my master batch file, what parameters do I need to add the the watchDirectory.exe calls?

I am not sure what you mean, sorry.
Do you have a .bat file that starts several WD's (1 for each drive)?
Then you probably need to prefix the watchDirectory commands with "start /min", like:
Code:
start /min "c:\program files\gdp software\watchDirectory\watchDirectory.exe c:\dir1towatch c:\bin\wdbatfile.bat
start /min "c:\program files\gdp software\watchDirectory\watchDirectory.exe d:\dir1towatch c:\bin\wdbatfile.bat
start /min "c:\program files\gdp software\watchDirectory\watchDirectory.exe e:\dir1towatch c:\bin\wdbatfile.bat
 


Otherwise the .bat file will wait for the first watchDirectory to exit before starting the next.

Is this what you mean?
Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
daved
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 8
Re: watching multiple directories on different dri
Reply #4 - Jul 20th, 2004 at 7:43am
 
yes.  I didn't know about the /min.  Thanks, I'll try that.
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2239
The Netherlands
Re: watching multiple directories on different dri
Reply #5 - Jul 20th, 2004 at 12:44pm
 
Also, a small trick to get a valid watchDirectory command line:
1. Configure watchDirectory using the GUI (watchDirectoryStart)
2. Run (to make sure you have it setup correctly)
3. Press CTRL+F5 on the GUI
This copies the complete command line to the windows clipboard, ready to paste into your .bat file.

Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
daved
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 8
Re: watching multiple directories on different dri
Reply #6 - Jul 22nd, 2004 at 11:36am
 
I am still having a bit of an issue:

start /min "c:\program files\gdp software\watchDirectory\watchDirectory.exe c:\dir1towatch c:\bin\wdbatfile.bat

in the above command, is there anyway I can reference c:\dir1towatch within the c:\bin\wdbatfile.bat (ie.  is there an environment variable which holds that info? just as %WD_RELDIR% holds directory info?  I need the entire path c:\dir1towatch.)

Can I use %1 or %2 or something like that?  I'm not sure how I can access these arguments in the batch file.

Thanks again for your help,

Dave
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2239
The Netherlands
Re: watching multiple directories on different dri
Reply #7 - Jul 22nd, 2004 at 12:01pm
 
All environment variables are described in the online help (see "writing bat files"), and also here:
http://www.gdps.dk/products/watchDir/help/bat.html.

Directory related environment variables are:
%WD_DIR% -  the directory that is watched (guess you want this).
%WD_FILE_D% - the directory of the new/changed/deleted file.

Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
daved
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 8
Re: watching multiple directories on different dri
Reply #8 - Jul 23rd, 2004 at 9:08am
 
Gert,
  I am still having some problems....

I tried making a master batch file by using the Ctrl-F5 technique you showed me  Grin and now I get the following when I try to run it:

Invalid switch - "/s".

Here is the contents of my master batch file:
@echo off
:: This file is called to begin watching all archivable directories
:: It monitors and adds new/changed files to a corresponding zip file
:: The prefix of the zip file is determined by which line the watched directory is on below

start /min "C:\Program Files\WatchDirectory\watchDirectory.exe" /s /xO /f /fast /RETRY10 /4 /i /h /v "C:\wedding contacts" "C:\Program Files\WatchDirectory\edited batch\WDAutoWinZip.bat"
start /min "C:\Program Files\WatchDirectory\watchDirectory.exe" /s /xO /f /fast /RETRY10 /4 /i /h /v "C:\Program Files\Microsoft Office\Templates" "C:\Program Files\WatchDirectory\edited batch\WDAutoWinZip.bat"
start /min "C:\Program Files\WatchDirectory\watchDirectory.exe" /s /xO /f /fast /RETRY10 /4 /i /h /v C:\Zips "C:\Program Files\WatchDirectory\edited batch\WDAutoWinZip.bat"

Thanks for all your help so far,

Dave
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2239
The Netherlands
Re: watching multiple directories on different dri
Reply #9 - Jul 23rd, 2004 at 12:21pm
 
Hi Dave,

That is not watchDirectory complaining, but the start command.
It will use the first quoted string it sees as the window title for the new process.
If you change your commands to something like this:
Code:
start "watchDirectory" /min "c:\program files\gdp software....
 


it should be ok. Now, start will use "watchDirectory" instead of the WD command line as the window title.

Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
daved
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 8
Re: watching multiple directories on different dri
Reply #10 - Jul 30th, 2004 at 11:28am
 
Gert,

Thanks again for all your help!!

My boss has unfortunately put this project on hold....stupid office politics!!  I am sure I will be looking at this again in a few months.  I have to say, I am very surprised how well the product works!

Thanks again Gert for all your help...!!  I'll probably be messaging you again when the project resumes! Take care!

Dave
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2239
The Netherlands
Re: watching multiple directories on different dri
Reply #11 - Jul 30th, 2004 at 11:46am
 
No problem, Dave.
Have a look here http://www.dilbert.com/comics/dilbert/archive/images/dilbert2004261480729.gif to brighten up your day.

Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Page Index Toggle Pages: 1