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
Run Any BAT File not working (Read 3951 times)
SwindonYid
YaBB Newbies
*
Offline



Posts: 7
Run Any BAT File not working
Feb 4th, 2013 at 10:36am
 
Hi,

I am using Watch Directory to run a batch file when new files arrive in a directory, the watch directory task does not seem to see any new files hit the watched directory yet when I run the batch file on it's own it works fine.

any ideas?

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



Posts: 2225
The Netherlands
Re: Run Any BAT File not working
Reply #1 - Feb 4th, 2013 at 10:52am
 
Hello Matt,

A few things to try.
First: do NOT run the task as a Windows Service. Set it to run "normal". Does it work that way? See this blog how to let it run as a service again: http://blog-en.gdpsoftware.com/2010/04/watchdirectory-tasks-as-windows-service.h...

The above fixes most issues.... however, if it is still not working, try this:
Replace your bat file with a really simple bat file that just writes a line to a log as "proof" it was called by WD. Something like
ECHO %WD_FILE% >> C:\Temp\logfile.txt

Does that work?
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
 
SwindonYid
YaBB Newbies
*
Offline



Posts: 7
Re: Run Any BAT File not working
Reply #2 - Feb 4th, 2013 at 11:02am
 
Hi Gert,

the "run as a windows service" is greyed out so I cannot tick or untick this option. (currently showing as unticked)

I have tried changing the bat file to ECHO %WD_FILE% >> C:\Temp\logfile.txt but again, the task does not run....manually run then the logfile has Echo is on in it.
Back to top
 
 
IP Logged
 
SwindonYid
YaBB Newbies
*
Offline



Posts: 7
Re: Run Any BAT File not working
Reply #3 - Feb 4th, 2013 at 11:05am
 
I have just deleted and recreated the task, now if I drop a file into the watched directory I get.....

***ERROR*** TTC Error Code: 0
Description: The operation completed successfully.
. Caught unhandled exception, current event ignored.

Regards

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



Posts: 2225
The Netherlands
Re: Run Any BAT File not working
Reply #4 - Feb 4th, 2013 at 11:06am
 
Can you please enable "debug" for the task, then run it again. Create a backup and email it to me (see below for my email). This is all explained here: http://blog-en.gdpsoftware.com/2010/06/send-task-backup-to-support.html

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



Posts: 7
Re: Run Any BAT File not working
Reply #5 - Feb 4th, 2013 at 11:20am
 
Hi Gert,

I have emailed you the zip file as requested.
Many thanks

Matt
Back to top
 
 
IP Logged
 
SwindonYid
YaBB Newbies
*
Offline



Posts: 7
Re: Run Any BAT File not working
Reply #6 - Feb 4th, 2013 at 5:05pm
 
Hi,

as an extra bit of information, the task appears to work fine if I have a copy of the files on my desktop that are being placed in the monitored folder on my D drive!!!

Strange unless I am missing something really obvious!!

Huh
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1