Hi,
Can someone help. I tried many and still fail.
I tried to loop through a list of zip folder to try to find specific txt file that is under a subdirectory of the zip folder. when I get the filelist in the zip folder, I saw the txt file as subdirector/mytxtfile_123.log. Below is my script, but it fails to download the txt file. there is IO problem where it complains "system cannot find the path specified". I wonder if the flipped of "\" to "/" when I get the filelist. Is there a neat way to get the file in subdirectory or a zip ?
path == path where all zip folder located;
path1 == path where txt file going to save;
lst = {the list of the zip folders};
for (k=1, k <=N items(lst), k++,
Try(
za = open(path||lst[k], zip);
dirlist = za << dir;
for (l=1, l<=N Items(dirlist), l++,
If (Contains(dirlist[l], "mytxtfile_"),
text = za << read(dirlist[l]);
save text file(path1||lst[k]||"_"||dirlist[l],text);
);
)
,
print (lst[k] || "fail to open");
Throw();
);
);