CD Procedure
Changes the current working directory.
Usage
CD[, directory]
Input Parameters
directory—(optional) If specified, this parameter is a string specifying the path of the new working directory. If it is specified as a null string, the working directory is changed to the user’s home directory.
If this parameter is not specified, no directory change is made and the current directory remains the working directory.
Keywords
Current—Creates a variable that stores the current directory name. You can store the name of the current working directory and change the working directory in a single statement:
CD, new_dir, Current=old_dir
The variable old_dir contains the name of the working directory before the change to new_dir.
Discussion
Initially, the working directory is the directory from which you started PV-WAVE.
This procedure changes the working directory for the current PV-WAVE session and any child processes started during the session after the change is made. It does not affect the working directory of the process that started PV-WAVE. Therefore, when you exit PV-WAVE, you will be in the directory you were in when you started.
The PUSHD, POPD, and PRINTD procedures, which maintain a directory stack and call CD to change directories, provide a convenient interface to CD.
Examples
UNIX
On a UNIX system, to change the current working directory to
/usr/home/mydata, enter the following at the WAVE> prompt:
CD, '/usr/home/mydata'
To move to the home directory, enter the following:
CD, ''
Windows
To change the current directory to D:\user\home\mydata, enter the following at the WAVE> prompt:
CD, 'D:\user\home\mydata'
See Also
Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.