Hi Folks
I read in a lot of posts in a lot of forums that people need the feature of adding directory structure information into par-archives. I am waiting now for at least 3 months that the next version of QuickPar would be released, but nothing happened.
So I tried. I loaded the sources of par2cmdline-0.4 and tried to add the relativ path into these par2 files. The par2 spec allows that. I am not a very good c++ programmer but it works. I would be very proud if some of you would like to test this feature.
Here's a short instruction:
I added the -d commandline switch which has to be followed by a base-directory which will be removed from the absolute path of the files you wish to par so that a relative path would be created. This relative path is stored in the par archive file descriptor.
An example: (WIN)
Your files are in C:Images. There are directories for FAMILY, NATURE, ... full of pictures.
You don't want that C:Images would be store in the par files, would you? No. So the commandline switch has to be -dC:Images
The information stored in the par archive would then be like NATUREimage1.jpg.
The last parameter(s) have to be the files you wish to par. You could give them with wildcards, but you have to specify each subdirectory. e.g.:
"C:imagesnature*" "C:imagesfamily*".
I tested it under linux as well and it worked there, too.
Please have a try and feel free to post your comments.
The download link is:
<!-- m --><a class="postlink" href="http://pacer.dyndns.info/par2/par2cmdline-0.4-dirsupport-src.rar">http://pacer.dyndns.info/par2/par2cmdli ... rt-src.rar</a><!-- m -->
Offline
sounds interesting, but the link appears dead
perhaps try putting it on a static server
Offline
Sorry my dyndns update tool crashed. Now you should be able to get it.
Offline
if you could put a precompiled version up it will allow many more people to try it out, unless there is a reason you only want the source code up
Offline
I keep getting "ERROR! Couldn't remove basedir name from absolute filename" after each file. Can you post a sample command line so i check syntax?
Offline
The problem is one special to your situation (directory). The Program reads all given files (by commandline) and stores the full path (original version). My part tries to remove the basedir from this absolute path. You have to give the basedir with the commandline parameter -dBASEDIR.
Be sure not to have a space between the -d and the name of the directory. If the directory itself has spaces please put it into " ".
If the basedir you specify is not part of the absolute filename you get the error message you reported. If it now doesn't work, please post your commandline.
PS: A question about the precompiled version: I can compile a version under linux and provide it. I'm not sure if it is correct to publish a program which is compiled with an unregistrated compiler (demo version you know?).
Offline
i used:
par2 c -s250000 -r5 -dd:temptest parity d:temptest1*.* d:temptest2*.*
the files in the first directory has 8.3 filenames, the files in the second dir has long file names. all files returned the same error
i compiled the program under winxp sp2 with MS Visual Studio .NET 2003
p.s. i believe borland has a free commandline compiler
Offline
Hi I think I know your problem:
Windows itself is not case sensitiv with its directory structure. It will find files even if the case is wrong. But par2 is case sensitive in the moment it tries to remove the basedir from the absolute path. Please try to find out how your directory's name exactly is. You could try the dir command in a shell. The Windows Explorer has a property which must be activated to show the real spelling of a file/dir.
Thanks for your interest and patience...
Pacer.
Offline
For all who want to try, here are the compiled versions:
For Linux (tested only under Suse 9.1):
<!-- m --><a class="postlink" href="http://pacer.dyndns.info/par2/par2cmdline-0.4-dirsupport-linux.rar">http://pacer.dyndns.info/par2/par2cmdli ... -linux.rar</a><!-- m -->
For Windows: (tested only under WinXP):
<!-- m --><a class="postlink" href="http://pacer.dyndns.info/par2/par2cmdline-0.4-dirsupport-win32.rar">http://pacer.dyndns.info/par2/par2cmdli ... -win32.rar</a><!-- m -->
Sources again:
<!-- m --><a class="postlink" href="http://pacer.dyndns.info/par2/par2cmdline-0.4-dirsupport-src.rar">http://pacer.dyndns.info/par2/par2cmdli ... rt-src.rar</a><!-- m -->
Offline
i am sending you my log file and par2 file. itis now removing all directory is formation, and not storing the relative paths
Offline
Please post your log file here. Thx.
Offline
par2cmdline version 0.4, Copyright (C) 2003 Peter Brian Clements.
par2cmdline comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it and/or modify
it under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version. See COPYING for details.
Block size: 250000
Source file count: 28
Source block count: 626
Redundancy: 5%
Recovery block count: 31
Recovery file count: 5
Opening: 10.mp3
New Filename 1/10.mp3
Opening: 11.mp3
New Filename 1/11.mp3
Opening: 12.mp3
New Filename 1/12.mp3
Opening: 2.m3u
New Filename 1/2.m3u
Opening: 3.nfo
New Filename 1/3.nfo
Opening: 4.sfv
New Filename 1/4.sfv
Opening: 5.mp3
New Filename 1/5.mp3
Opening: 6.mp3
New Filename 1/6.mp3
Opening: 7.mp3
New Filename 1/7.mp3
Opening: 8.mp3
New Filename 1/8.mp3
Opening: 9.mp3
New Filename 1/9.mp3
Opening: parity.par2
New Filename 1/parity.par2
Opening: parity.vol00+01.par2
New Filename 1/parity.vol00+01.par2
Opening: parity.vol01+02.par2
New Filename 1/parity.vol01+02.par2
Opening: parity.vol03+04.par2
New Filename 1/parity.vol03+04.par2
Opening: parity.vol07+08.par2
New Filename 1/parity.vol07+08.par2
Opening: parity.vol15+15.par2
New Filename 1/parity.vol15+15.par2
Opening: 00_amon_amarth-fate_of_norns-promo-read_nfo-2004-amrc.m3u
New Filename 2/00_amon_amarth-fate_of_norns-promo-read_nfo-2004-amrc.m3u
Opening: 00_amon_amarth-fate_of_norns-promo-read_nfo-2004-amrc.nfo
New Filename 2/00_amon_amarth-fate_of_norns-promo-read_nfo-2004-amrc.nfo
Opening: 00_amon_amarth-fate_of_norns-promo-read_nfo-2004-amrc.sfv
New Filename 2/00_amon_amarth-fate_of_norns-promo-read_nfo-2004-amrc.sfv
Opening: 01_amon_amarth-an_ancient_sign_of_coming_storm-amrc.mp3
New Filename 2/01_amon_amarth-an_ancient_sign_of_coming_storm-amrc.mp3
Opening: 02_amon_amarth-where_death_seems_to_dwell-amrc.mp3
New Filename 2/02_amon_amarth-where_death_seems_to_dwell-amrc.mp3
Opening: 03_amon_amarth-the_fate_of_norns-amrc.mp3
New Filename 2/03_amon_amarth-the_fate_of_norns-amrc.mp3
Opening: 04_amon_amarth-pursuit_of_vikings-amrc.mp3
New Filename 2/04_amon_amarth-pursuit_of_vikings-amrc.mp3
Opening: 05_amon_amarth-the_valkyries_ride-amrc.mp3
New Filename 2/05_amon_amarth-the_valkyries_ride-amrc.mp3
Opening: 06_amon_amarth-beheading_of_a_king-amrc.mp3
New Filename 2/06_amon_amarth-beheading_of_a_king-amrc.mp3
Opening: 07_amon_amarth-arson-amrc.mp3
New Filename 2/07_amon_amarth-arson-amrc.mp3
Opening: 08_amon_amarth-once_sealed_in_blood-amrc.mp3
New Filename 2/08_amon_amarth-once_sealed_in_blood-amrc.mp3
Computing Reed Solomon matrix.
Constructing: 0.0%
Constructing: 3.2%
Constructing: 6.4%
...
Constructing: 96.7%
Constructing: done.
Processing: 0.1%
Processing: 0.2%
Processing: 0.3%
...
Processing: 99.9%
Processing: 100.0%
Writing recovery packets
Wrote 7750000 bytes to disk
Writing recovery packets
Writing verification packets
Done
Offline
The result par2 files have no directory information in them at all, instead of relative or even absolute info. Thus, to verify I need to place all files in one dir, and thus, back to square one.
Offline
First, you see the lines starting with "New Filename"? There you can see which filename (relative path) I store into the par files. As I can see 1/filename.xxx and 2/filename.yyy I am sure par2cmd saves the relative paths correctly.
Second: I worry about the par files which are added to your archive:
Opening: parity.par2
New Filename 1/parity.par2
Opening: parity.vol00+01.par2
New Filename 1/parity.vol00+01.par2
Opening: parity.vol01+02.par2
New Filename 1/parity.vol01+02.par2
Opening: parity.vol03+04.par2
New Filename 1/parity.vol03+04.par2
Opening: parity.vol07+08.par2
New Filename 1/parity.vol07+08.par2
Opening: parity.vol15+15.par2
New Filename 1/parity.vol15+15.par2
I think you started par2 from within one of your directories to par. You should not include the .par2 files (which are created/changed at that time) into your par archive. (Somehow as you would like to zip 10 files and also the archive itself.
Third: When verifying you need to place the .par2 files exactly there from where par2 can read all files by adding the relative path written in the par2 files to the current working dir.
Example:
if your directory structure looks like that:
C:test1*.*
C:test2*.*
and you start par2 with the option -dC:test
the relative pathes stored in the par files are as given in your log post.
You should start par2cmd from C:test
Reason 1: the created par2-files are stored outside of your "par-ed" directory structure
Reason 2: when trying to verify/repair it will find all files.
I know all of my explanations sound strange and difficult but I wish that you and probably others which have the same problem are able to understand the simple mistake you perhaps did.
Good luck,
Pacer
Offline
par2createv0.1.cmd
[url:iint0chw]http://webpages.charter.net/dlevens/par2/par2create0.1_levens_script.zip[/url:iint0chw]
I created a pretty sweet batch file that works with par2cmdline v0.4
It asks you a series of questions and gives you a few options on where to save the par2 files. I wrote this because I wanted to create par2 files for a ton of files and did not want to have to specify each folder.
This script will ask for a root folder to start in and will scan for every folder and subfolder below it and create par2 files for every file.
Just double click on par2createv0.1.cmd to run
Here are some screen shots:
[img:iint0chw]http://webpages.charter.net/dlevens/par2/Image1.gif[/img:iint0chw]
[img:iint0chw]http://webpages.charter.net/dlevens/par2/Image2.gif[/img:iint0chw]
[img:iint0chw]http://webpages.charter.net/dlevens/par2/Image3.gif[/img:iint0chw]
[img:iint0chw]http://webpages.charter.net/dlevens/par2/Image4.gif[/img:iint0chw]
[img:iint0chw]http://webpages.charter.net/dlevens/par2/Image5.gif[/img:iint0chw]
[img:iint0chw]http://webpages.charter.net/dlevens/par2/Image6.gif[/img:iint0chw]
Hope this helps,
If anyone wants to add to this script to make it even better, please share your work.
Dennis Levens
Offline