/* SAS DATA Step to Create Directory                    */

filename sascbtbl 'c:\sas\winapi.txt';
     
data _null_;
rc=modulen( '*e',
            'CreateDirectoryA',
            'c:\sas\newdir',
           0
          );
if (rc=0) then put 'ERROR: Cannot create directory';
run;
     
   /* SAS DATA Step to Remove Directory                    */     

data _null_;
rc=modulen( '*e',
            'RemoveDirectoryA',
            'c:\sas\newdir'
          );
if (rc=0) then put 'ERROR: Cannot remove directory';
run;