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
Execute batch file plugin (if exist dir condition) (Read 3641 times)
mkanet
Junior Member
**
Offline



Posts: 64
Execute batch file plugin (if exist dir condition)
Feb 14th, 2012 at 5:44pm
 
Hi Gert, I think I might have made you mad by asking about two different problems in my previous previous forum post.  I hope you will forgive me.  Embarrassedhttp://www.watchdirectory.net/cgi-bin/yabb2/YaBB.pl?num=1329140641/0.  So... I made a separate forum post trying to figure out a way to handle this:

I have an existing WD task which executes a batch file as soon as an audio/video file is created or deleted using fast monitoring method.  How can I prevent this from happening if a *.tmp folder exists?   I swear, I tried to figure out how to do this based on your previous suggestion (in the above URL), however, I can't figure it out for this existing WD task.  I really appreciate your all your help.
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2238
The Netherlands
Re: Execute batch file plugin (if exist dir condit
Reply #1 - Feb 14th, 2012 at 6:02pm
 
Not mad, just a little tired.

People asking things. I create a script according to their wishes. Then they come with extra information (must remove directory immediately)... This happens sooooo often (on the forum and by email), it is sometimes a bit frustrating. There are days I just smile about it, today is not such a day.


Add this to the top of your current bat file:
[code]
rem check if there is a tmp folder somewhere below the monitored directory
DIR /s /ad "%WD_DIR%\*.tmp"
if %errorlevel% EQU 0 GOTO :EOF
[/code]

This checks if a *.tmp directory exists somewhere below the monitored directory (%WD_DIR%) and if it does (errorlevel = 0) quits the script (GOTO :EOF).
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
 
mkanet
Junior Member
**
Offline



Posts: 64
Re: Execute batch file plugin (if exist dir condit
Reply #2 - Feb 14th, 2012 at 6:39pm
 
Gert, you are a very good person.  You always help your users out; even the weirdest possible requests.  WD is such an amazing software; however, what makes it "extraordinary" is the support you offer to your users.  The best way I can show my appreciation is to tell others about your amazing software and to donate to a charity that needs help.  Thank you.
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2238
The Netherlands
Re: Execute batch file plugin (if exist dir condit
Reply #3 - Feb 15th, 2012 at 9:10am
 
Sorry for yesterday, I know you are a good guy.
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