How to create a directory programmatically using a batch file, SAS, SPSS, Stata, or R

.BAT :

mkdir -p “c:\newdirectory\level 1\level 2”

R:

dir.create(“c:/newdirectory/level 1/level 2”, recursive = TRUE)

STATA:

mkdir “c:\newdirectory”

mkdir “c:\newdirectory\level 1”

mkdir “c:\newdirectory\level 1\level 2”

SAS: options noxwait;

         x mkdir -p “c:\newdirectory\level 1\level 2”;

SPSS:

HOST COMMAND=[‘MD ” c:\newdirectory\level 1\level 2″‘].


 
Quick Links