Owning Class: support
Requires: MathScript RT Module
c = cd
c = cd '..'
c = cd(a)
c = cd a
Returns or modifies the working directory.
|a||Specifies a new working directory. a is a string.|
|c||If you specify c = cd, c returns the current working directory. If you specify c = cd '..', c changes the working directory to the parent directory of the current working directory. If you specify c = cd(a) or c = cd a, c changes the working directory to a. c is a string.|
When calling a built-in function, you can pass an input without parentheses if that input is a string. For example, the following syntaxes all pass the file path C:\ as a string:
cd(a) requires that you define the variable to pass to the function, so if a = 'C:\', then cd(a) also passes the file path C:\ as a string.
Changes you make to the working directory using this function apply only to the current instance of the LabVIEW MathScript Window or the MathScript Node from which you call the function. Changes to the working directory for one MathScript Node do not apply to any other MathScript Nodes. LabVIEW resets the working directory to the default when you close the LabVIEW MathScript Window or when the MathScript Node stops executing. Use the MathScript: Search Paths page of the LabVIEW MathScript Properties dialog box to change the default working directory for the LabVIEW MathScript Window. Use the MathScript page of the Options dialog box to change the default working directory for MathScript Nodes in the main application instance.
The following table lists the support characteristics of this function.
|Causes reduced performance ()||Yes (if you supply input)|
|Supported in the LabVIEW Run-Time Engine||No|
|Supported on RT targets||No|
C = cd
C = cd '..'
C = cd('C:\Program Files\National Instruments')