Jump to content

Shell Command

From LabVIEW Wiki
Revision as of 09:37, 8 October 2007 by Michael_Aivaliotis (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The exec VI function can be used to send shell commands. Include the shell call with the commands that are desired. Under Windows 2K/XP/Vista operating systems the call is to cmd.exe. For example, the string to copy filea to a drive would be [code] cmd /C "copy filea a:" [/code] with the arguments enclosed in quotes. The exact shell call will depend on the operating system. For Windows 98/ME it is command.com.

To open a document with its associated application, use the start command. [code] cmd /C "start "" "c:\document.txt" [/code] will open document.txt with Notepad (Windows default).