Shell Command

From LabVIEW Wiki
Jump to: navigation, search

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

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).