Thursday, April 17, 2008

Using SAS Statements to Change the Current Folder

[Copied from SAS document]

Using SAS Statements to Change the Current Folder

You can change the current drive and folder by submitting the change directory (CD or CHDIR) command with the X statement in SAS. SAS intercepts the change directory command and then changes drive commands and changes its current folder.

For example, the following statements change the current folder for your SAS session to the MYDATA folder and G:\SALES\JUNE folder, respectively:

x 'cd \mydata';
x 'cd g:\sales\june';

To change the current drive, you can submit a change drive command (the drive letter followed by a colon) such as the following:

x 'a:';

No comments: