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

UDF - UDS Library
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

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

Zip file lister


#definefunction listzip(zipfile, action)
	AddExtender("WWZIP34I.DLL")
	list = zUnZipFiles('t', zipfile, '*.*', '', '')
	if strsub(list, 1, 1) == 0
	   if strsub(list, strlen(list), 1) == @tab then list = strsub(list, 1, strlen(list)-1)
	   list = strreplace(list, 'OK%@tab%', @tab)
	   cnts = itemcount(list, @tab)
	   list = itemremove(cnts, list, @tab)
	   list = itemremove(1, list, @tab)
	   list = strreplace(list, @tab, '')
	   list = strreplace(list, 'testing: ', ':')
	   list = strreplace(list, '/', '\')
	   list = strsub(list, strindex(list, ':', 1, @fwdscan)+1, -1)
	   Ziplist = ''
	   for cnt = 1 to itemcount(list, ':') 
	      Ziplist = iteminsert(strtrim(itemextract(cnt, list, ':')), -1, Ziplist, @tab)
	   next
	
	   if strlower(action) == "select_files"
	      asklist = ziplist
	      Ziplist = askitemlist('Select Files to Extract', Asklist, @tab, @sorted, @multiple)
	   endif
	   if strlower(action) == "display_list" then askitemlist('Files in the archive', Ziplist, @tab, @sorted, @multiple)
	else
	   message("Error", "Impossibile to get a list of files in archive!")
	   Ziplist = "Error"
	endif
	return(Ziplist)       ;ziplist is the list of files OR "Error"
#EndFunction



Article ID:   W15001
File Created: 2001:11:08:12:41:20
Last Updated: 2001:11:08:12:41:20