Current Working Directory Variable |
The CWD string variable displays the current working directory for your worksheet. The working directory is the default directory to save worksheets and read data files. To see its value, type CWD = anywhere in your worksheet. You can concatenate filenames onto this value, a useful feature when reading or writing files repeatedly in a program loop.
Before a worksheet has been saved (new worksheets), the value of CWD is the directory into which you installed Mathcad (usually C:\Program Files\Mathsoft\Mathcad). After you have saved your worksheet, the CWD is the same as the location of the file. To change the default value of CWD: