OL Learn

Batch file from within a runscript

Hi

I have a script where I’m putting files into 2000 file chunks and zipping them up so I need to call a batch file. Does anyone know the syntax for doing this in jscript

You could probably do this just as easily using External Program which is already available in workflow as a plugin.

However, to execute a batch script as I think you mean, do this:

var wShell = new ActiveXObject("WScript.Shell");
wShell.Run("C:\\myDirectory\\myBatchScript.bat");

thanks that’s perfect. I couldn’t do it within the external program module though as I need to batch down into 200 chunks and write out a index file from the meta data for each 2000