home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 2
/
ctrom_ii_b.zip
/
ctrom_ii_b
/
PROGRAM
/
PASCAL
/
PARADIS1
/
ZIPHEAD.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1992-03-26
|
2KB
|
68 lines
(4843) Sat 21 Mar 92 14:57
By: Joy Mukherjee
To: Stevo Wierengo
Re: View Zip file contents
St:
---------------------------------------------------------------------------
@MSGID: 1:387/255 75b82377
SW>Does anybody have any routines to view zip file contents.
SW>Stev0
procedure ViewZip (ZIPFile : String);
const
Sig = $04034B50;
type
ZFHeader = record
Signature : LongInt;
Version,
GPBFlag,
Compress,
Date,
Time : Word;
CRC32,
CSize,
USize : LongInt;
FNameLen,
ExtraField : Word;
end;
var
Hdr : ^ZFHeader;
F : File;
S : String;
begin
{Open ZIP file, get all Files from that zip, close ZIP }
New (Hdr);
Assign (F, ZIPFile);
Reset (F, 1);
repeat
FillChar (S, SizeOf (S), #0);
BlockRead (F, Hdr^, SizeOf (ZFHeader));
BlockRead (F, Mem [Seg (S) : Ofs (S) + 1], Hdr^.FNameLen);
S [0] := Chr (Hdr^.FNameLen);
If (Hdr^.Signature = Sig) then Writeln (S);
Seek (F, FilePos (F) + Hdr^.CSize + Hdr^.ExtraField);
until Hdr^.Signature <> Sig;
Close (F);
Dispose (Hdr);
end;
This was kind of copied / keyed in from another program of mine, but it
should work OK. Let me know if you need more help. I also have an ARJ
one if you choose to add it to your BBS, although I think its similar to
LZH...
* SLMR 2.1a # * This tagline stolen by Silly Little Mail Reader!
--- MsgToss 2.0c! (r)
* Origin: Nul 512-615-NUL1 HST/V32b,615-NUL2, NUL3, 1.2Gig (1:387/255)
@PATH: 387/255 823 170/400 512/0 1007