Shell Command: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| (One intermediate revision by one other user not shown) | |||
| Line 3: | Line 3: | ||
cmd /C "copy filea a:" | cmd /C "copy filea a:" | ||
[/code] | [/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''. | 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. | To open a document with its associated application, use the '''start''' command. | ||
[code] | [code] | ||
cmd /C start "" "c:\document.txt" | cmd /C "start "" "c:\document.txt" | ||
[/code] | [/code] | ||
will open ''document.txt'' with Notepad (Windows default). | will open ''document.txt'' with Notepad (Windows default). | ||
[[category:external code]] | |||
Latest revision as of 09:37, 8 October 2007
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).