Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

dos (MathScript Function) (Windows, Not in Base Package)

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Member of the support class.

Syntax

dos(command)

dos(command, '-echo')

[code] = dos(command)

[code] = dos(command, '-echo')

[code, output] = dos(command)

[code, output] = dos(command, '-echo')

Description

Executes a Windows or DOS command in the current working directory. If you call this function in the LabVIEW Run-Time Engine, LabVIEW executes the command in the directory where you installed the stand-alone application or shared library. This function is similar to the System Exec VI.

Examples

Inputs

Name Description
command Specifies the Windows or DOS command you want to execute. command is a string. Before continuing execution, LabVIEW waits for the operating system to finish executing the command. To direct LabVIEW not to wait for the operating system to finish executing the command, include & at the end of the command string.
'-echo' Directs LabVIEW to display the output in the Command Window of the LabVIEW MathScript Window.

Outputs

Name Description
code Returns the return code of the command.
output Returns the output string of the command.

Examples

[code, result] = dos('help')

[code, result] = dos('ipconfig', '-echo');

dos('explorer')

Related Topics

system


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit