Path: number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!msrtrans!News.Dal.Ca!halifax!ak621
From: ak621@chebucto.ns.ca (Richard Bonner)
Newsgroups: alt.msdos.batch,alt.msdos.batch.nt,fidonet.batpower
Subject: Re: ZipLister.bat
Followup-To: alt.msdos.batch,alt.msdos.batch.nt,fidonet.batpower
Date: Tue, 25 Mar 2008 14:37:23 +0000 (UTC)
Organization: Chebucto Community Net
Lines: 48
Message-ID:
References:
NNTP-Posting-Host: chebucto.ns.ca
14:37:23 GMT)
NNTP-Posting-Date: Tue, 25 Mar 2008 14:37:23 +0000 (UTC)
Bytes: 2385
Xref: number1.nntp.dca.giganews.com alt.msdos.batch:93672
alt.msdos.batch.nt:42572 fidonet.batpower:591
FileGod (0@0.0) wrote:
> I just made a simple file list generator for zip file, it gets the
> File_id.diz from the zips & adds it to the list, it is a pretty basic batch
> file & requires pkunzip, so far it does NOT work with long file names but it
> should even work with MS-DOS, I made it on a Win XP machine...
> Beats me why but it adds all the files in the directory to the list & I am
> too tired to mess with it anymore right now.
> @echo off
> for %%x in (*.zip) do call :process %%x
> :process
> pkunzip -e %1 File_id.diz>nul
> dir /b %1>>Files.txt
> dir %1|find "bytes"|find /v"bytes free">>Files.txt
> type File_id.diz>>Files.txt
> echo --------------------------------------------->>Files.txt
> del File_id.diz
> http://www.filegod.netfirms.com
*** I would:
To generate a list of files in a .zip archive and save that to a
file:
PKUNZIP -vbn FILENAME.ZIP > CONTENT.TXT
This will show a brief list of files in name order and save them to a
file.
To save every current-directory ZIP file's FILE_ID.DIZ contents to one
file, I would do this for the "Process" part:
PKUNZIP -c %1 FILE_ID.DIZ >> CONTENT.TXT
This will extract each FILE_ID.DIZ from each zip file in the "FOR" set
and send it to CONTENT.TXT.
If your DOS version's "FOR" command can handle redirection, the whole
batch file can be done in one line after "@ECHO OFF" :
FOR %%F IN (*.ZIP) DO PKUNZIP -c %%F FILE_ID.DIZ >> CONTENT.TXT
Richard Bonner
http://www.chebucto.ca/~ak621/DOS/
|