Jump to content

Finding out how many maps are in a zip


Recommended Posts

Let’s say you have a huge zip file or other archive full of WADs. Is there any way to determine how many actual maps are present? I’m just curious to count the sheer number of maps present in various different wad packs I have. Thank you in advance!

Share this post


Link to post

I ran into problems like that often, which is why I created wadcat. For a zip, you would need to unzip the files. Otherwise you just need:

 

1. A command to list all the files

2. A way to extract the MAPxx/ExMy header entries (under the assumption they are all valid, of course; this is what wadcat does).

3. A way to count the number of things extracted.

 

So in Unix/Linux, this would be:

$ find . -iname *.wad -print0 | xargs -0 -L1 -- wadcat -qm | wc -l
     174

find = find all the wad files in a folder hierarchy

xargs = pass them to wadcat

wc = count the number of printed lines in the output

 

In my case, I learned I have 174 maps in my "to play" folder. I guess I have a lot to do! :)

Share this post


Link to post
  • 1 month later...

@Doomkid here: CountMaps.

 

use like this:

countmap.exe *.zip >list.txt

 

it understands ".wad", ".zip", ".pk3" files. for zips, it will check if there are ".wad" or ".pk3" files inside, and check them. i.e. you don't need to unpack anything. enjoy. ;-)

 

p.s.: if wildcards don't work, ping me here, and i'll fix it (i am too used to shell wildcard expansion on *nix, and don't remember if MinGW runtime does it on Windows, or not).

Edited by ketmar

Share this post


Link to post

Ketmar, I cannot thank you enough..!

 

EDIT: uh oh, I'm getting "k8vavoom fatal error: out of memory for 66528 bytes!"

Share this post


Link to post

your zip is freakin' huge, right? ;-) currently, the program tries to load things in memory for speed. i'll take a look, and maybe will add a switch for slower mode.

Share this post


Link to post

You are so talented with Doom programs, Ketmar.. Thanks for using it to help me so many times now. Works like a charm!

 

Turns out, there's 8,589 maps in the Big Vanilla Wad Pack (though probably 200 or so are duplicates between Doom1 and 2, demo "map fragments" that come with DEU and such, yadda yadda..) but still, that's a whole hell of a lot of Doom!

Share this post


Link to post
13 minutes ago, Doomkid said:

Works like a charm!

great! no problems, i'm simply reusing k8vavoom code here (and found some small bugs there, so you prolly helped me more than i helped you ;-). glad it worked.

Edited by ketmar

Share this post


Link to post

p.s.: if anybody's interested, the source is here. but it is using my own build tools, and k8vavoom core libraries, so it is prolly of no much use. yet GPL demands is, so here it is. ;-)

Edited by ketmar

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...