Skip To Content

INTEGRAL

INTEGRAL DSL Reference Guide

Jump directly to: 

::my.app.CmdLine(flags, cmdline, separator = ' ')

This function executes an external command line program.

Parameters

flags

A bitmask that can be used to customize the behavior of the function.

cmdline

A string that represents the entire command line. This must include the program to execute plus any arguments to pass.

The cmdline string may contain the following reserved keywords:

separator

A character that is used to separate individual parts of the command line specified by cmdline. Normally a single space character is used but your program is free to choose a different character if this is more suitable.

Return Value

The function returns DV_RET_OK on success and a non-positive value on failure.

Example 1

local cmdline = "zip C:\temp\archive.zip C:\temp\file1.txt C:\temp\file2.png";
local result = ::my.app.CmdLine(1, cmdline);

Example 2

local cmdline = "zip|C:\temp\archive.zip|C:\temp\file1.txt|C:\temp\file2.png";
local result = ::my.app.CmdLine(1, cmdline, '|');

Example 3

::my.app.SetHeaders("Content-Disposition: attachment; filename=\"archive.zip\"\r\n");
::my.app.Write("../private/files/archive.zip");

local cmdline = "{{PROG_ZIP}}|-d|{{CURR_OUTPUT}}|unused_file.txt";
local result = ::my.app.CmdLine(1, cmdline, '|');