runInShell(a)

Runs specified code in a Windows shell


Syntax

o_runInShell(a)
a: scalar Text - full command line to execute
return: int - exit code

Usage

Input needs to be the full command as you would enter it directly in a windows CMD shell. If spaces are included in path or file names, they need to be quoted.

Location

menu: veeos ==> system ==> runInShell

library: sysLib

Example

o_runInShell("copy C:\\temp\\somefile.txt C:\\temp\\newname.txt")  uses the file system executable "copy" to copy the file somefile.txt to a new file newname.txt

Notes

This function brings up a CMD shell, executes the given command line, and then exits (cmd /C option). The present working directory is used as the "working directory", so absolute paths are generally needed. This function provides a simple way to run programs from within a formula or other expression. If more flexibility is needed then use the underlying native VEE "Execute Program" object

Reference

cmd options can be found via "help cmd" at a command prompt or can be found at Microsoft.

Supported On

VEE 7.0+, Windows XP+

See Also

 


© 2015-2025. All Rights Reserved. Stan Bischof (stan@worldbadminton.com). Last updated 03 February 2023 13:03.