Wednesday, May 10, 2023

Loop opening txt file and create a variable

Hi all,

I have a series of txt file stored in a folder.

I would love to do the following (ideally via loop):
1-Open each file
2-Create a variable with same name as the file title (so it will identify the file)
3-Stored all the files in dta within the folder.

Finally, I would love to append all dta file so to have a one single dataset.

Many thanks for any advice you might have!


No comments:

Post a Comment