Hello,
I am struggling with using local in my code.
Here is the sample code.
My objective is to execute the dofile named "2005_labor_20230921_21352" located in the "D:\Dropbox\research\stata_files" directory.
Since the filename is quite long and I need to perform similar tasks with other files, I employed the fs command to simplify the implementation.
However, I encountered an issue with the error message stating "file D:\Dropbox\research\stata_files`dofile'.do not found."
Thank you.
I am struggling with using local in my code.
Here is the sample code.
HTML Code:
cd "D:\Dropbox\research\source_data" local dopath "D:\Dropbox\research\stata_files" clear fs "`dopath'\2005*.do" return list local dofile = r(files) do "`dopath'\`dofile'"
Since the filename is quite long and I need to perform similar tasks with other files, I employed the fs command to simplify the implementation.
However, I encountered an issue with the error message stating "file D:\Dropbox\research\stata_files`dofile'.do not found."
Thank you.
Comment