Menu

#12 auto scan for extra files

Add Functionality
open
Peter C
5
2003-09-12
2003-09-12
Anonymous
No

if a .par2 file does not have the .par2 extension in the filename it will not be recognized at all!!

some newsreader append a _unfinished or something like that, and par2cmdline will not find this as a par file even if it has some new blocks containing

Discussion

  • Nobody/Anonymous

    Logged In: NO

    a switch would be nice to let the tool search *every* file in the same dir for blocks of any kind, let it determine if its a par or a damaged file. not just by the filename!!! would be a terrific tool then, if you just start it and it will do whatever is possible !!!
    thanks

     
  • Peter C

    Peter C - 2003-09-14

    Logged In: YES
    user_id=477089

    At present par2cmdline assumes that all files have the
    correct file extension. If you have a file which does not have
    the .par2 file extension then you will need to rename it so
    that it does.

    I have no plans to enable par2cmdline to auto scan for files.
    Any file you want it to look at must be listed on the command
    line.

    A command line option to override the file type determination
    is a good idea. That way you could force a file to be treated
    as a recovery file or data file (even if it does not have
    a .par2 file extension when it should - and vice versa). This
    would also be useful in the case of ISO images where you
    would want to scan the single file for both recovery blocks
    and data blocks.

     
  • Michael J Evans

    Michael J Evans - 2003-09-26

    Logged In: YES
    user_id=329158

    Actually the origional .par specification made a small checksum hash at
    the beginning of each file. It is a shame that .par2 doesn't keep such a
    sum, it would be VERY useful as usenet attachments can often be
    mis-named. It would also help on CDs with limited filename lengths.

    Actually, it would be useful if such a hash could be produced every %
    of a large file. Then stored with said file's size. Matching sizes would
    get deep checks, and non-matching shallow.

     
  • Peter C

    Peter C - 2003-09-26

    Logged In: YES
    user_id=477089

    The presence of a checksum clearly has nothing whatsoever
    to do with recognising the type of the file. The checksum is
    there to detect damage.

    The PAR1 file format has a single block of header information
    that is always at the beginning of the file. This header
    includes a magic field with a fixed value that must be correct
    for the file to be a valid PAR1 file. NB The presence or
    absence of the magic value to does guarantee that the file is
    or is not a PAR1 file but can be used as a quick check to
    decide whether or not to process the rest of the file.

    With the PAR2 file format each file consists of many
    independent packets of data with their own header. Because
    PAR2 is designed to work with damaged files, it cannot tell
    simply by examining the start of the file whether it is a
    damaged par2 file or not a par2 file at all. It must therefore
    rely on the presence of the .par2 file extension.

    What I might do is make the initial assumption about file type
    based on the file extension, and if nothing is found, try the
    other possibility.

     

Log in to post a comment.