Trying to confirm whether a file exists, and erase it if it does exist. Can't seem to figure out how to do this with a Windows path with spaces. Here's my MWE:
The erase command produces this error
Code:
webuse auto local pathname `c(pwd)' save "`pathname'\erasetest.dta", replace confirm file "`pathname'\erasetest.dta" erase file "`pathname'\erasetest.dta"
Code:
invalid '"C:[path]\erasetest.dta'
Comment