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 batch file not working (Read 10120 times)
brianmac
YaBB Newbies
*
Offline



Posts: 3
run batch file not working
Aug 24th, 2006 at 2:27pm
 
I have been using the product for about a year. I have had no problems using it. It currently runs 3 tasks - flawlessly. I wanted to add a new task. I have been trying for a day to monitor a folder for an XLS file that changes. The program seems to recongise the change and run the batch file, but the batch file is not running. If I manually run the batch file, it ftp's a file to are production system. When I make a change to the file manually, Watchdirectory says it ran the batch file, but I don't see the FTP'd file on our production system nor does it do anything else in the batch file. Here is the messages that I am getting:

Message            Message Time              Message Type              Message Text
16                     8/24/2006 7:28:34       Info                            Done
15                     8/24/2006 7:28:33       Info                            Starting F:\hrp\HRP.BAT for event

any help would be appreciated.
Brian
PS - I am running version 4.0.47 and this is running on a win2k server SP 4
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2239
The Netherlands
Re: run batch file not working
Reply #1 - Aug 24th, 2006 at 2:42pm
 
Can you enter something like

ECHO %WD_DTTM% %WD_FILE% >> C:\Temp\wdlog.txt

as the first line in your .bat file. That will write a line to wdlog.txt every time your .bat is started. Doing that will tell if your .bat file starts up.

Also, you could enable the option "capture output" on the .bat file settings window. Make sure your .abt has
ECHO ON
as the first line (and doesn't do an ECHO OFF somewhere). This will write logfiles of all started .bats to the directory
<task directory>\<task name>

<task directory> is the directory with all your task definitions (press CTRL+9 in the WD control Center to explore it)
<task name> is the name you gave to your task.
Reading these files may show what is wrong.

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



Posts: 3
Re: run batch file not working
Reply #2 - Aug 24th, 2006 at 3:18pm
 
wdlog.txt:

20060824 091435 F:\hrp\HRP.XLS 

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



Posts: 2239
The Netherlands
Re: run batch file not working
Reply #3 - Aug 24th, 2006 at 3:25pm
 
Okay, so this:
Quote:
... but the batch file is not running

is not really correct. The script is started by WD, but fails somewhere else.
If you follow my other tips about capturing the output of your script, it should become obvious what the problem is.

mmm, are you running the task as a service? perhaps you can try to run it "normal". If it works like that, it is probably a security/permission issue.

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



Posts: 3
Re: run batch file not working
Reply #4 - Aug 24th, 2006 at 4:44pm
 
Fixed! Your advice to <CTRL> - 9 and look at the log file worked for me. I needed to qualify all the commands, e.g. c:\winnt\system32\ftp......
Once that was done it worked fine.
Thanks for the help!
Brian
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1