Nzz2Nzb Documentation

(Release 1.0)



This is a simple utility that I originally wrote for fun as I was interested in the Newsbin 5 .NZZ file format, but that has since proved useful to others when trying to debug problems with Newsbin 5, or to recover data from damaged .NZZ files. Another useful facility is to patch the download path on entries to facilitate using .NZZ files on a different machine to the one on which they were created.

The primary function of Nzz2Nzb is to take the Newsbin 5 NZZ file format (as used for AUTOSAVE.NZZ, SCRATCH.NZZ and FAILED.NZZ) and convert it a more readable format by outputting it as a .NZB file. Such a .NZB file can be loaded into a tool such as a text editor or Internet Explorer to examine it further. The files can also be loaded into the Newsbin 4.3x series.

The Nzz2NZB program also carries out some consistency checks on the NZZ file and reports on any issues it finds.

An additional function is to output a NZZ file with any errors detected having been corrected. This is of particular use to those who have a large Download list that it would be a lot of effort to recreate, and Newsbin is refusing to load the NZZ file for some reason. An associated capability allows the fixed NZZ file to contain a patched download path which can be useful if trying to use a NZZ file on another machine from the one where it was originally created.

* Installation

No SETUP.EXE program is supplied. It is expected that users of a utility such as this will be capable of doing a manual install!

Points to note are:

There is no registry information or anything of that sort associated with this program.


It is used from a DOS command window using a command of the form: NZZ2NZB [options] sourcefile [targetfile] If targetfile is omitted, then the source filename with extension changed to .NZB is assumed.

The Nzz2Nzb program supports a number of command line options. None of them are mandatory, but they do allow you to customise some of the behaviour of the Nzz2NZB program

-? display a usage message summarising the parameter options available
-d indicates omit outputting binary fields (such as 'flags' and 'date' in a human readable form as well (e.g. textDate, textFlags). These are included by default as they help when you are trying to debug why something might be wrong. The text versions of these fields are, however, ignored when loading a NZB file back into Newsbin so this option allows you to keep the file size down.
-f Attempt to produce a "fixed" NZZ file. The output file will be the same as the input file with a .fixed extension added. Typically used in conjunction with the -t option to suppress the generation of a NZB file.

A good reason to try this option is if you find Newsbin will not start up properly unless you remove one of its .NZZ files - typically the AUTOSAVE.NZZ file. Another scenario is one in which Newsbin does not start up but does not appear to have loaded all of the AUTOSAVE.NZZ file. Newsbin gives up on finding any problems with the NZZ file, while Nzz2Nzb tries to continue regardless and can often recover data from the point at which a problem is encountered.

Another reason for this option is that if you load a NZB file into Newsbin 5 then the file will only be downloaded by message-id. If you have actually created your download list from headers then you may wish the server related record-number and group information to be preserved. Using this option will therefore create a new .NZZ file with any suspect entries stripped out that you can try and put back in place and then try and use the repaired file with Newsbin.

To help me develp facilities in this area users are encouraged to submit to me any .NZZ files that they have that the Nzz2Nzb program has not appeared to handle correctly. Examining damaged files gives me a chance to see what (if any) change to Nzz2Nzb would have allowed it to handle that particular type of damage.

-l indicates that any warning messages should be logged to a file instead of to the screen. The filename will be the same as the input file, but with a .log extension added.
-n if present indicates strict NZB compatibility, so Newsbin extensions omitted if not present then same format as used by Newsbin 4.3x series.
-p Change the download path. This option would normally be used in conjunction with the -f option to allow you move a .nzz file from one machine to another one.

The -p option must then be followed by a parameter of the form XXX=YYY where XXX represents the old path information and YYY the new path information. The nzz2nzb program will then examine the download paths on the file it is reading looking for any that start with the string XXX and replacing that string with the YYY value.

Examples of valid options might be:

to change the drive from X: to R:. A more advanced use might be something like:
to change the drive from X to R and at the same time remove the DOWNLOAD directory from the start of the name, or perhaps
to keep the drive the same but add the DOWNLOAD folder into each path.

-t Run in test mode. Basically this suppresses the output of the NZB file, but any error or warning messages are still output. Can be useful for quickly testing a NZZ file to see if the Nzz2Nzb program can detect any potential problems with the input NZZ file.

It can also be useful if running Nzz2Nzb with the -f used to try and fix a .NZZ file as then you may not be interested in creating a .NZB file.

-w Warning/Error messages should be embedded as comments in the generated NZB file when they are detected. This makes it easier to scan the NZB file for the exact point at which a problem was detected in the NZZ file.
-z Include entries in the NZB file for which there are zero header entries in the NZZ file. Normally these would be omitted.


The following are ideas for inclusion in future releases If anyone wants to suggest ideas then I am more than happy to add them to the list to be considered as possible enhancements in future releases. Also please provide feedback on the ideas mentioned above. I am more likely to put the effort into implementing options that others have indicated would be of use to them.

The following information might be of interest to anyone who thinks they might like to examine the source of the Nzz2Nzb program.


This library and associated documentation has been produced by:

Dave Walker
22 Kimptons Mead
Potters Bar,
United Kingdom


This software and its associated documentation are copyright 2005-2006 by D.J.Walker. All rights are reserved.


Every effort has been made to ensure that the software operates correctly as specified in this document. However no guarantee of any kind is given that the software is reliable or that the descriptions contained in this document is accurate. It is up to the user of the software to satisfy himself that it is suitable for the use to which it will be put.


31/07/2006: v1.0

10/05/2006: v0.9

29/01/2006: v0.8

15/01/2006: v0.7

10/01/2006: v0.6

30/12/2005: v0.5

12/12/2005: v0.4

23/11/2005: v0.3

16/11/2005: v0.2

12/11/2005: v0.1