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.

List of Files within a Zip Archive

Keywords: 	 file list

Question:

Is there an easy way to get a list of the files inside a zipfile? In the following line, the result does not seem usable. I simply want the list of the files...
data=zunZipFiles("l", "zipfile", "*.*", "", "c:\")

Answer:

AddExtender("wwzip34I.dll")
zipfile="C:\Incoming\1 work\wwads34i.zip"
data=zunZipFiles("l", zipfile, "*.*", "", "c:\temp")
;data=StrReplace(data,@crlf,@tab)
datacount=ItemCount(data,@tab)

filelist=""

for xx=1 to datacount
   thisline=ItemExtract(xx,data,@tab)
    
    if strindex(thisline,"Central directory entry #",0,@fwdscan) !=0
    xx=xx+3
    file=StrTrim(ItemExtract(xx,data,@tab))
    if filelist=="" then filelist=file
    else filelist=strcat(filelist,@tab,file)
    endif
next

AskItemList("File List",filelist,@tab,@unsorted,@single)



Article ID:   W14564
Filename:   List of Files in Zip Archive.txt
File Created: 2001:03:01:15:01:40
Last Updated: 2001:03:01:15:01:40