WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Zipper

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to Get a List of Files in a Zip Archive

Keywords:   list of files zip archive

AddExtender("wwzip34i.dll")
zipfile="C:\Temp\Archived Compilers\2004B Beta\compiler.zip"

data=zUnZipFiles("l", zipfile, "*", "", "")
datacount=ItemCount(data,@TAB)
count = 1
filelist=""
For xx=1 To datacount
	thisline=ItemExtract(xx,data,@TAB)
	If StrIndex(thisline,"Central directory entry #",0,@FWDSCAN) !=0
		If count == 1
			xx = xx+3
			count = 0
		else 
			xx = xx+5
		endif
		file=StrTrim(ItemExtract(xx,data,@TAB))
		filelist=StrCat(filelist,@TAB,file)
	EndIf
Next
filelist = StrTrim(filelist)
AskItemlist("File List",filelist,@TAB,@UNSORTED,@SINGLE)

Exit

Article ID:   W14811
File Created: 2004:03:31:13:41:12
Last Updated: 2004:03:31:13:41:12