Dear statalist,
I am using Stata/SE 15.1 for Mac. I am using a global to specify my path at the beginning of my do file. I write it like this:
However, in the command window Stata returns it like this, with additional spaces, e.g. after "felix":
This later causes problems when I later refer to my path using other commands, such as import excel, as STATA tells me that it cannot find the specified file:
I specify my command like this:
and then STATA returns the command like this, with additional spaces in the command window with an error message "not found":
So sum up, the problem seems to be that STATA adds spaces to my command that are not included in the folder names and this seems to misspecify the path when I try to draw on it. I checked spelling and everything is in double-quotes.
Many thanks in advance for your help.
I am using Stata/SE 15.1 for Mac. I am using a global to specify my path at the beginning of my do file. I write it like this:
Code:
global path "/Users/felix/Dropbox/Felix/F&Vs PHD/EINITE/Aggregation/Paper/Aggregation_21082019/"
Code:
global path "/Users/felix /Dropbox /Felix/F&Vs PHD / EINITE/ Aggregation/Paper/Aggregation_21082019"
I specify my command like this:
Code:
import excel "$path/TOTAL WITH PROPERTYLESS/Germany_total_1400.xlsx", firstrow
Code:
file /Users/felix /Dropbox /Felix/F&Vs PHD / EINITE/ Aggregation/Paper/Aggregation_21082019/TOTAL WITH PROPERTYLESS/Germany_total_1400.xlsx
Many thanks in advance for your help.