WatchDirectory Forum
watchDirectory forums >> Plugins >> Run Batch file Plugin

Message started by aravinthk on Jan 29th, 2009 at 3:39am

Title: Run Batch file Plugin
Post by aravinthk on Jan 29th, 2009 at 3:39am
I am trying to use the run batch file plugin to monitor a directory for new files and to run a batch file. The batch file basically transfers the new file to a ftp server using coreftp command line scripting. The task works fine when I run it manually, however the task hangs after the coreftp call when I run the task as a Windows Service, since I can see the CoreFTP program running in the background process and it never ends. Can this be because Watch Directory tasks don't have access to the network(internet/tcpip)? How can this issue be best fixed?

Title: Re: Run Batch file Plugin
Post by Dirk on Jan 29th, 2009 at 8:09am
Hi aravinthk,

please click at the button "Windows Services" at the right column of watchDirectory Control Center.
Look for the service of your task, it is named: watchdirectory:[yourtaskname], where [yourtaskname] is the name of your task. Double click it an chose tab "Login". You can see that the service is running under the credentials of "Local Service". "Local Service" does not have access to the network. Please change this into a user/pass with sufficient rights for network access.

Title: Re: Run Batch file Plugin
Post by Gert on Jan 29th, 2009 at 9:59am

don't have access to the network(internet/tcpip)

TCP/IP (and thus FTP) *is* available to Services, however a firewall may be the issue here. If you run something like McAfee, please check its logs (or the Windows Event log) to see if it has blocked your coreftp.exe program.

To add to what Dirk suggests, when you run batch files "as a service", also make sure to:
  • Only use UNC style paths (\\server\share) as your network drive-mappings (X:) are not available
  • Use full paths to files and programs ("C:\Program Files\CoreFtp\coreftp.exe" instead of coreftp.exe) because the PATH is different for services


WatchDirectory Forum » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2017. All Rights Reserved.