Commands

There are some direct commands from Stata to read for example the folder structure and create new folders or copy files:+

// List structure of current directory ("*" also reads sub-folders)
dir *

// Create a new directory (folder structure)
mkdir project
mkdir project/code
mkdir project/data

// Copy a file into another directory (or under a new name)
copy "data_$date.dta" "project/data/data_$date.dta"

// Compare the data currently loaded in Stata with the copied file
cf * using "project/data/data_$date.dta"
// As with "confirm", no output means everything is fine