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
How to Copy with a Condition (Read 2886 times)
preisinger
YaBB Newbies
*
Offline



Posts: 3
How to Copy with a Condition
Jan 9th, 2006 at 10:25pm
 
I am evaluating the application and I am very impressed with it's capabilities
However, I have a particular need that I would like to test.

I have a need to move newly created directories as they are created. These directories contain several files including "output.txt"
-If "output.txt" is there then move the directory
-If "output.txt" is not there try again
-If "output.txt" is not there after 10 minutes send out an email

1) How do I place a condition on the copy statement?
2) Is it possible to have it evaluate the directory for x time? then after x time send an email if conditions are not met?
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2238
The Netherlands
Re: How to Copy with a Condition
Reply #1 - Jan 10th, 2006 at 4:32am
 
I think your best bet would be to create 2 tasks.

One will monitor for those new directories, and send an email if they still exist after 10 minutes. You can use the technique described in our newsletter  (the topic "files that MUST be deleted"). I am not 100% sure, but that technique should work for directories as well.

The other task will do the actual MOVE. You will need to use the Auto start a .bat file plugin for this. Use the files that trigger events tab so it will only run for the filemask *\output.txt.
Inside your .bat file, you move the complete directory. As the directory will be gone, your first task will not send an email. If output.txt doesn't show up in time, the first task will send an email.

Send me an email with some more details if you need help to create the .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
 
preisinger
YaBB Newbies
*
Offline



Posts: 3
Re: How to Copy with a Condition
Reply #2 - Jan 10th, 2006 at 11:28pm
 
I test out the Email notification when a directory is not deleted.
However It is emailing me for every directory whether I deleted it or left if in the directory.
I set the delay to 5 minutes and placed 3 directories into my monitor directory. I then deleted 2 of them within 1 minute.
I received an email for all 3 directories.
I would like to only receive an email for any directories remaining after 5 minutes.
I attached the backup zip.

[b]edit: removed the zip file after I have downloaded it[/b]
Back to top
« Last Edit: Jan 11th, 2006 at 4:51am by Gert »  
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2238
The Netherlands
Re: How to Copy with a Condition
Reply #3 - Jan 11th, 2006 at 4:50am
 
A fixed version of wdRun.exe is posted in our beta forum.
Like I said before, I was not 100% sure the trick would also work with directories. The fixed wdRun now also checks if the directory still exists before calling your task for "new directories".

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