List files in zip ? #27
Replies: 4 comments 2 replies
-
Hi,
You can extract this INI file in-memory without writing any file to disk like this
. . . where For enumerating all the entries (files) inside the ZIP you can use
Note that there was a bug in |
Beta Was this translation helpful? Give feedback.
-
Hi , Thanks :) About listing files, thanks, I get some result :)
Not really a problem (just have to keep lines where FileName finishes by other than \ ) , but just to know if normal or not ? Thanks :) |
Beta Was this translation helpful? Give feedback.
-
About the INI file: my idea was to read the contents of the INI file to a string with something like this
. . . not to If this doesn't ring a bell with you then probably you have no use of this INI content reading code so you can ignore it. |
Beta Was this translation helpful? Give feedback.
-
Oh ok for the ini, I understand (well, I think ) :) About deirectories inside zip archive, CSIDL and numbers (subofledr)s are directories too, I was just a little suprised to not have something like this : But no problem, I adpated my code so lines FileNames that finished by " \ " are not threated :) |
Beta Was this translation helpful? Give feedback.
-
Hi wqweto :)
In my project, when I launch the "Backup" function, I zip files and classing them in subfolders based on CSIDLs ( related with Elroy's message here ), so for example, a file on user Music's folder will be ziped in CSIDL/13/MyFile.mp3 . It is usefull to restore it on the current user Music's folder of another machine, especially if the user name is different and is we pass from XP <=> Win 10 (avoiding the problem "Users" folder instead of "Documents and settings"). All files are designed from a .ini where all used files (by software) are listed. Of course, I include this ini file in the archive.
To "Restore" , I unzip the ini file, and after, I read the ini file to extract files from archive.
Even if the unzip script looks ok in my project, I'm curious and I would know if there way to list (recursivly) files that are stored in a zip file , with your library ?
Thanks :)
Couin
Beta Was this translation helpful? Give feedback.
All reactions