Macros for SAS Application Developers
https://github.com/sasjs/core
mp_deletefolder.sas File Reference

A macro to delete a directory. More...

Go to the source code of this file.

Detailed Description

Will delete all folder content (including subfolder content) and finally, the folder itself.

Usage:

%let rootdir=%sysfunc(pathname(work))/demo;
%mf_mkdir(&rootdir)
%mf_mkdir(&rootdir/subdir)
%mf_mkdir(&rootdir/subdir/subsubdir)
data "&rootdir/subdir/example.sas7bdat";
run;

%mp_deletefolder(&rootdir)
Parameters
[in]folderUnquoted path to the folder to delete.

SAS Macros

Related Macros

Definition in file mp_deletefolder.sas.