Yutaka-Sawada / MultiPar

Parchive tool
1k stars 44 forks source link

feature request different folder deep level support, individual file recovery file there #126

Closed feadraug closed 5 months ago

feadraug commented 7 months ago

Hi. If i have a large merge of folders up to 3rd-4th level, with a lot of files there, is it possible to give a program a list of files to create recovery files there individually (1 file - 1 par2)? For example, root/folder1/folder2/file_to_be_done.abc root/folder1/folder2/folder3/file_to_be_done.abc etc or for all files in a folders with level 3? root/folder1/folder2/folder3/. or *.especialfiletypes Or i need to learn how to use phyton scripts first? :)

Yutaka-Sawada commented 7 months ago

is it possible to give a program a list of files to create recovery files there individually (1 file - 1 par2)?

There is "Batch script" page in MultiPar's English help documents, which exists MultiPar's "help/0409" folder. Subject "Create one PAR2 file per each file in a selected folder" seems to be your case. The script accepts one folder, and will create indivisual PAR2 file for each file in the folder. When there are 10 files in the folder, it will create 10 PAR2 files.

I'm not sure how is your knowledge about batch scripting. You may refer usage on internet. The usage of "par2j64.exe" is written on "Command_par2j.txt" in MultiPar's "help" folder.

feadraug commented 7 months ago

How can i here specify a folder? there is no SET parameter for folder or any other parameter to be set except path to par2j.exe It shows only part "GoTo END" I modified a little this script and it works but, that is less away from example sry

@ECHO ON
SETLOCAL

path=C:\xxxxxxx\yyyyyy

check input path
IF "%path%"=="" GOTO End
IF NOT EXIST "%path%" (
ECHO The path does not exist.
GOTO End
)

REM set options for PAR2 client
SET par2_path="C:\aaaaa\bbbbb\cccccc\par2j.exe"

REM recursive search of files
PUSHD %~1
FOR /R %%G IN (*.extension1) DO CALL :ProcEach "%%G"
POPD
PUSHD %~1
FOR /R %%G IN (*.extension2) DO CALL :ProcEach "%%G"
POPD
PUSHD %~1
FOR /R %%G IN (*.extension3) DO CALL :ProcEach "%%G"
POPD

GOTO End

REM run PAR2 client
:ProcEach
ECHO create for %1
%par2_path% c /fo /sm2048 /rr10 /ri /in /lr32767 "%~1.par2" %1

GOTO :EOF

:End
ENDLOCAL
Yutaka-Sawada commented 7 months ago

How can i here specify a folder?

Though I wrote how to on my help documents, my English words might be strange. I try to explain the usage with long English sentence. Save your written batch script on a file, like "batch.bat". There are some ways to specify a folder.

1) Type everytime by keyboard

This usage is written on my help documents as "Command". If you use the batch file at Command-Prompt, change directory to the batch file at first. Next, type batch.bat "path of the folder". If there is no space in the path, no need to cover by "". The path may be absolute path or relative path from the batch file. Normally absolute path would be safe.

2) Drag & Drop a folder by mouse

This usage is written on my help documents at first. On Windows Explorer, drag a folder and drop it on your "batch.bat". If you put the "batch.bat" on desktop, it will be easy to Drag & Drop.

3) Select SendTo at Windows Explorer's right click menu

This usage is written on my help documents second. At first, create short-cut icon of the "batch.bat". Name it to something easy to understand like "Create PAR2". Then, put the short-cut icon in your SendTo folder. You can open the SendTo folder by typing shell:sendto on path-box of Windows Explorer.

After you select a folder on Windows Explorer, click mouse's right button. Select "SendTo" item on the right-click menu. There will be "batch.bat" (or your named one) item in the SendTo sub-menu. Then, select the "batch.bat" (or your named one).

feadraug commented 7 months ago

I may have been somewhat inattentive in my reading. Perhaps a little more clarity in the examples would have helped not only me. Anyway, the script and I managed to accomplish our tasks. I am very grateful to you for this program and the possibilities it provides.

Yutaka-Sawada commented 7 months ago

I'm glad to hear that it works well.

I may have been somewhat inattentive in my reading. Perhaps a little more clarity in the examples would have helped not only me.

Oh, I see. I updated my help documents a little. Though my English skill isn't so high, I try as possible as I can.