Hi everyone,
I have a quick question. Could anyone explain me the difference between these two local macros in stata:
and
The macro in red is not working. But I just want to understand better why I have to use double quotes in my first example, in order to create properly my folder's names.
Thank you in advance.
Best,
I have a quick question. Could anyone explain me the difference between these two local macros in stata:
Code:
*** * Creation of paths and folders local project_dir "//hes-nas-prairie.hes.adhes.hesge.ch/Home_M/michael.duartego/Documents/Desktop/Analyse" cd `project_dir' * * making folders in the current directory local d `" "rawdata" "Figures" "tables" "do_files" "master" "' * foreach folder in `d' { di `"`folder'"' cap mkdir `"`project_dir'/`folder'"' }
Code:
***
* Creation of paths and folders
local project_dir "//hes-nas-prairie.hes.adhes.hesge.ch/Home_M/michael.duartego/Documents/Desktop/Analyse"
cd `project_dir'
*
* making folders in the current directory
local d ` rawdata Figures tables do_files master'
*
foreach folder in `d' {
di `folder'
cap mkdir `project_dir'/`folder'
}
Thank you in advance.
Best,
Comment