how i can unzip a file with drawers and subdrawers? i´m attempting it, but doesn´t work here,
i can only unzip all the zipped files in the same drawer, can you post a short example for do it?
thanks
UnZip files
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: UnZip files
I don't have an example handy, but it's really not difficult. From the top of my head:
1) zip.OpenArchive()
2) Iterate over all entries in the ZIP archive (can be queried using #ZIPATTRNUMENTRIES)
3) Call zip.GetFileAttributes() on each entry to determine if entry is a file or a directory
4) If it's a directory, call MakeDirectory() to create it
5) If it's a file, call zip.ExtractFile() to unpack it
6) zip.CloseArchive()
That's pretty much about it. Shouldn't be difficult to implement. You don't even need recursion, just a simple for loop.
1) zip.OpenArchive()
2) Iterate over all entries in the ZIP archive (can be queried using #ZIPATTRNUMENTRIES)
3) Call zip.GetFileAttributes() on each entry to determine if entry is a file or a directory
4) If it's a directory, call MakeDirectory() to create it
5) If it's a file, call zip.ExtractFile() to unpack it
6) zip.CloseArchive()
That's pretty much about it. Shouldn't be difficult to implement. You don't even need recursion, just a simple for loop.
-
- Posts: 267
- Joined: Fri Feb 24, 2012 9:34 am
Re: UnZip files
perfect, working nice here
thanks
thanks