I'm still trying to figure out how exactly to use Execute Command. Can it be used to, well, simply execute a command? Say, I just want to execute this simple bat-file:
@ECHO OFF
ECHO.
ECHO This is a batch file
ECHO.
PAUSE
CLS
EXIT
Is that possible, and if so, how do you configure the properties of Execute Command?
Execute Command - again.
Re: Execute Command - again.
If the command is more than one line you have to do a Batchfile (.bat) that you run in the Execute command. To create that with variables you can use my App "Execute command friend" it will let you create the .bat-file on the fly for Execute command.
Re: Execute Command - again.
We run bat files all the time. To do this we set the Execute Command properties to run a Switch Script which in turn fires the bat file and moves the switch job to the next folder in a flow after Execute Command.
The Switch Script file is set up something like this. It is invoked each time a new job arrives:
The Switch Script file is set up something like this. It is invoked each time a new job arrives:
Code: Select all
Function jobArrived(s, job)
Set shell = CreateObject("WScript.Shell")
shell.CurrentDirectory = "\\servername\directory_where_bat_file_exits"
shell.Run "mybatfile.bat"
'Send job to next flow element
job.sendToSingle(job.getPath())
End Function