A short thread (PSA) on a FOC (frequently occurring problem) that shouldn’t be one: file paths in statistical software.
Comment in a recent reply to one of our replication reports (note: this was not actually a problem):
“We use a HPC and a Linux environment. Therefore, the folders are separated by / and not \ . This might create problems if working with Windows.”
Actually, it does not!
Every Stata user (but in particular those on Windows) should know 👇. Rule: ALWAYS use “
/”, NEVER “
\” and you should be fine.
/” and it will do the right thing.
os.path.join() is your friend
And there are likely similar functions in lots of other programming languages and statistical software.
Be aware of and always use the platform independent coding of paths, either a function or using “
/”. NEVER use “