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
Question regarding "Start .bat files" plugin (Read 5108 times)
KRKA01
YaBB Newbies
*
Offline



Posts: 4
Question regarding "Start .bat files" plugin
Jul 7th, 2008 at 1:45pm
 
Hi,

I have watchDirectory Professional and monitor a directory to use the "Start .bat files" plugin. I run this as a windows services.
If i stop the services and there a currently an active .bat file running, do watchdirectory terminate the acative .bat file instantly or will watchdirectory let the active .bat file run to the end?

Thanks

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



Posts: 2225
The Netherlands
Re: Question regarding "Start .bat files" plugin
Reply #1 - Jul 7th, 2008 at 2:18pm
 
Hello Krister,

The bat file will not be terminated, but run until completion.

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
 
KRKA01
YaBB Newbies
*
Offline



Posts: 4
Re: Question regarding "Start .bat files" plugin
Reply #2 - Jul 7th, 2008 at 2:35pm
 
Thats great news, thanks for the quick reply.

Another thing, is it possible to have some sort of validation script, that only runs one time when i start the services for the "start .bat files" plugin, there i can check if my enviroment is ready, check for neccesary programs and folders etc? If the enviroment is not reday, do not start the service.  I know i can add this to the bat file i kick off every time a new files arrives, but i only want to check this when i start the service?

Many thanks

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



Posts: 2225
The Netherlands
Re: Question regarding "Start .bat files" plugin
Reply #3 - Jul 7th, 2008 at 2:43pm
 
Not really, but it is perhaps a good idea to implement something for it.

Currently, one of the environment variables that is set is WD_CUREVT (see http://www.watchdirectory.net/wdhelp/plugins/wdopAutoRunBatEnv.html ) that will have a unique number for the current event. Perhaps we can add a new variable, for example WD_EVENTNO, that will have the "event number" for the current run, so the very first event (detected file) will set this variable to 1.

That way, you can do something like the following in your script:

Code:
IF %WD_EVENTNO% EQU 1 Call "C:\MyScripts\FirstCall.bat" 



The next release of WD will be somehwere later this week.

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
 
KRKA01
YaBB Newbies
*
Offline



Posts: 4
Re: Question regarding "Start .bat files" plugin
Reply #4 - Jul 7th, 2008 at 2:48pm
 
Ok, thanks for the info and quick reply

Krister
Back to top
 
 
IP Logged
 
KRKA01
YaBB Newbies
*
Offline



Posts: 4
Re: Question regarding "Start .bat files" plugin
Reply #5 - Jul 14th, 2008 at 10:47am
 
Hi,

I noticed that you was able to implement the %WD_EVENTNO% variable in the 4.5.4 version.
Great work. Thanks.

Krister

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



Posts: 2225
The Netherlands
Re: Question regarding "Start .bat files" plugin
Reply #6 - Jul 14th, 2008 at 12:22pm
 
Hi Krister,

Yes we added that variable. Normally I post a message on the forum about new releases, but I forgot to do so yesterday.

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