02-06-2024, 05:38 PM
(02-06-2024, 05:04 PM)euklides Wrote: Thank'sExcellent addition.
And if you also want to know filesize:
Do
Get ff, , head
If head.signature <> Chr$(&H50) + Chr$(&H4B) + Chr$(&H03) + Chr$(&H04) Then Exit Do
fname = Space$(head.filenameLen)
FX$ = Space$(head.uncompressedSize)
Get ff, , fname
If filecount > UBound(strarr) Then ReDim _Preserve strarr(filecount) As String
strarr(filecount) = fname + "|" + _Trim$(Str$(Len(FX$)))
filecount = filecount + 1
Seek ff, Seek(ff) + head.extrafieldLen + head.compressedSize
Loop Until EOF(ff)
And the program works with *.epub files (that was my problem; epub are zip files)
A lot of file types are actually ZIP files in disguise. If the first two bytes of a file are 80 and 75 decimal, "PK", then the underlying data is more than likely a ZIP file in disguise.