Hi,

I have 62 files that are numbered in sequential order (1,2,3...) that I want to merge into and update a single .dta file. However, I have taken suggestions from multiple forums but am still getting a message that the file can not be found. Below is the code I am using

Code:
***Sheet with all merged data
use "/Users/seandocking/Documents/Work/MONSTERs Research/Environmental impact of MBS-subsidised imaging/Service data extracted 220321/untitled folder/Merged file.dta"


foreach num of numlist 1/62 {
merge m:1 Service using "/Users/seandocking/Documents/Work/MONSTERs Research/Environmental impact of MBS-subsidised imaging/Service data extracted 220321/untitled folder/dta/'num'.dta" , update
drop _merge
}
Any help would be greatly appreciated. I am unsure if this is a mac issue. Using 15.1.

Thanks,
Sean