Usenet (English) > Preusenet

Tweak Preusenet to use MultiPar or Par2+TBB?

<< < (2/2)

Hecks:
If you're starting from scratch and working in W7, you may as well write it as a PowerShell script (supported OOB in W7), it would be much easier. ;)

WarezMyGF:
I have no programming background. I googled around and Powershell is out of my league.  :-[

Thanks for the suggestion though! Once I get this batch script working it will be good enough for me.

WarezMyGF:
Here is a more up to date script to work with phpar2 (the fastest par2 to date). Works great in W7 x64! Props go to maker of MultiPar for making a template.

Just copy the code and save it as .bat, then drag n' drop the ROOT folder (which contains all the items one wants to par) over the .bat. Be sure to change "LOCATION OF PAR2.EXE HERE" to the location of the par2.exe, for example "C:\Par2\par2.exe". This will create 10% redundancy with block size of 1, 920, 000. You can change per your individual needs of course. Also, this only creates parity for rars.


--- Code: ---@ECHO OFF
REM this command script requires Windows 2000/XP

SETLOCAL

REM check input path
IF "%~1"=="" GOTO End
IF NOT EXIST "%~1" (
ECHO The path does not exist.
GOTO End
)
IF NOT "%~z1"=="0" GOTO End

REM set options for PAR2 client
SET par2_path="LOCATION OF PAR2.EXE HERE"
SET par2_redundancy=10

REM recursive search of sub folders
PUSHD %1
FOR /D /R %%G IN (*.*) DO CALL :ProcessFolder "%%G" "%%~nG"
POPD

:End

PAUSE
GOTO :EOF

REM create PAR2 files in each sub folders
:ProcessFolder
PUSHD %1
%par2_path% c -s1920000 -r%par2_redundancy% -l "%2.par2" "*.r*"
POPD

GOTO :EOF

ENDLOCAL

pause
--- End code ---


Now to figure out how to implement a check for Sample folder and if it does find it to create 30% redundancy and incorporate the name of the sample's file name. Would appreciate any help on this one last part.

Navigation

[0] Message Index

[*] Previous page

Go to full version