Dear Stata Users,
I have 10 zip files that contain txt files with the same name ('xyz'). The names of the zip files are file1990, where the '1990' indicates a year. I want to unzip these files into a folder. I want to do smth like this (please the "pseudo-code").
Is it possible to modify the line of code starting with "unzipfile"?
I have 10 zip files that contain txt files with the same name ('xyz'). The names of the zip files are file1990, where the '1990' indicates a year. I want to unzip these files into a folder. I want to do smth like this (please the "pseudo-code").
Code:
forvalues x=1990(2)2020 {
cd "C:\Users\Z1\Online Drivers\Projects\File"
di "Imports `x'"
unzipfile file`x'.zip, save(xyz`x'.txt) using "C:\Users\Z1\Online Drivers\Projects\File_unzip"
}

Comment