Hi, I am a beginner in Stata, and I'm trying to do read a number of files to form a dataset (and possibly append them together but haven't figured out how yet). All my files start with the same word, so i want to search the directory to find them. However in trying to read the files I run into the following error: `unexpected end of file r(612)` which is:

unexpected end of file
You used infile with a dictionary, and the file containing the
dictionary ended before the `}' character. Perhaps you forgot
to type the closing brace, or perhaps you are missing a hard
return at the end of your file. You may also get this message
if you issued the command #delimit ; in a do-file and then
subsequently forgot to use `;' before the `end' statement.
Here's the code I'm trying to use:

Code:
local main_wd = "C:\Users\data\LIONS_data\LIONS_data_2020"
cd "`main_wd'"
local files: dir . files "gs_event*"

foreach f of local files{
    #delim;
    infix str district 1-10 str caseid 11-20 str court_hist_id 21-30 str id 31-40 str
    type_event 41-44 str action 45-46 str event_date 47-57 str sched_date 58-68 str
    sched_time 69-79 str sched_loc 80-279 str staffid 280-289 str judgeid 290-299 str 
    create_date 324-334 str update_date 365-375
    using `f';
}
What's the issue? Also, if you could point me on how to use append to join these files that would be much appreciated.

Best,
Ezgi