WatchDirectory Forum
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl
watchDirectory forums >> How to... >> Multiple subtasks job to run a cmd file
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl?num=1489699199

Message started by IPA on Mar 16th, 2017 at 11:19pm

Title: Multiple subtasks job to run a cmd file
Post by IPA on Mar 16th, 2017 at 11:19pm
How do I call a CMD rather than a EXE file from a subtask?

Title: Re: Multiple subtasks job to run a cmd file
Post by Gert on Mar 17th, 2017 at 9:01am
Hello IPA,

The "run a bat file" task is not (yet) supported directly by the subtask plugin.

There is an easy work-around...
Create a subtask using the "Run any program" plugin: http://www.watchdirectory.net/wdhelp/plugins/wdopAutoLaunch.html

Let it start cmd.exe and as parameters use something like
/C "C:\Scripts\YourScript.cmd"

The same environment variables are available to your cmd file as when you use the "run any bat file", see http://www.watchdirectory.net/wdhelp/plugins/wdopAutoRunBatEnv.html

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