To use Python script, you need to install Python in your PC. The official download site is here. There are some useful documents and articles on the Internet. You may edit a sample script for your usage.
  Python script is saved on some text files in tool folder under MultiPar's installed directory. If you put a script file on another folder or under Program Files directory, you must set the path of par2j64.exe or MultiPar.exe on your PC. By default, I write relative path from the tool folder. You can refer the directory on MultiPar's Option window: "System settings" tab, "Folder location" section, "Open MultiPar's install folder" button.
Command | "path of script file" "path of folder1" "path of folder2" "path of folder3"... |
Input | specify some folders |
Action | This sample creates individual PAR2 set in each selected folder. For example, when you supply 7 folders, total 7 PAR2 set are made. |
Script file | each_folder.py |
  This sample tries to create efficient PAR2 files.
Command | "path of script file" "path of folder1" "path of folder2" "path of folder3"... |
Input | specify some folders |
Action | This sample creates individual PAR2 set in each selected folder. For example, when you supply 7 folders, total 7 PAR2 set are made. It shows GUI for setting. It's possible to filter source files by their size. |
Script file | large_files.py |
Caution | You must check MultiPar Option: "Always use folder name for base filename" in "Creation options" section on "Client behavior" tab. |
  Instead of searching all files in each specified folder, it will filter files by their size. In the sample, it selects files of 1 MB over. You may change the limit size. To send name of source files, it uses file-list.
Command | "path of script file" "path of folder1" "path of folder2" "path of folder3"... |
Input | specify some folders |
Action | This sample creates multiple PAR2 sets for many files in each selected folder. For example, when you supply 3 folders, it creates independent multiple PAR2 sets in every folder. In the sample, it will create a PAR2 set for 1000 source files. It's possible to change the limit value. When there are 3500 files in a folder, it will create 4 PAR2 sets in the folder. |
Script file | group_files.py |
  To distinguish PAR2 files, it uses stable filename with serial numbering. They are like; #1.par2, #2.par2, #3.par2... When there are sub directories in a folder, it will search inner files. To send name of source files, it uses file-list. The process may be very slow for many files.
Command | "path of script file" "path of file1 or folder1" "path of file2 or folder2" "path of file3 or folder3"... |
Input | specify some files and/or folders (You may select them manually on GUI.) |
Action | This sample creates multiple PAR2 sets for every selected files or folders. It creates one PAR2 set for each selected file or folder independently. PAR2 set for a file will be made in the same directory with the source file's name. PAR2 set for a folder will be made in the folder with the source folder's name. For example, when 3 files and 2 folders are selected, 5 items are shown on a list. Then, it will create 5 PAR2 sets continuously. It's possible to stop queue on GUI. |
Script file | queue_create.py |
Caution | While creation, existing PAR2 files are ignored. When there are old PAR2 files already, it doesn't erase them. (However it may over-write same name files.) If you want to re-create all PAR2 files newly, you must delete them at first manually. |
  You must set command-line options of par2j for creation. You should refer Command_par2j.txt in help folder. Because all creating PAR2 sets will use the same options, test with a few files to see result at first. When you want to confirm result by MultiPar, select a PAR2 set and push "Open with MultiPar" button.
  While creation, it shows details on Command Prompt window. You can control the progress by pushing a key on the Command Prompt. You may pause the process by pushing P-key. You may resume the process by pushing R-key. You may cancel the process by pushing C-key.
  You may create short-cut file of this script file. Put the short-cut on desktop or SendTo folder of Windows OS. Then, you can drag & drop files and/or folders on the short-cut. Or, select files on right-click "SendTo" menu. If you select one folder, it search inner items of the folder. If you select multiple items or one file, they are selected directly.
Command | "path of script file" "path of folder" |
Input | specify a folder (You may select it manually on GUI.) |
Action | This sample verifies multiple PAR2 sets in a selected folder. For example, when there are 7 PAR2 sets in a folder, they are shown on a list. It will verify each PAR2 set continuously. It's possible to stop queue on GUI. |
Script file | queue_verify.py |
Caution | You must select MultiPar Option: "Re-use verification result" to be "For 3 days" or longer, and you should check "Don't search subfolders" in "Verification and Repair options" section on "Client behavior" tab. |
  In this sample, it tries verification only. If you want to repair a damaged set automatically, use repair command instead of verify of par2j. When you want to confirm result by MultiPar, select a PAR2 set and push "Open with MultiPar" button. You may repair on the MultiPar GUI.
  While verification, it shows details on Command Prompt window. You can control the progress by pushing a key on the Command Prompt. You may pause the process by pushing P-key. You may resume the process by pushing R-key. You may cancel the process by pushing C-key. Even when you stop the verification task, it may save result partially.
  When you push "Folder" button, it searches PAR2 sets in the selected folder. By default, It doesn't search files recursively, because it may be slow. If you want to search all sub-directories, you need to edit the script. You may change behavior of starting verification automatically or not by editing the script.
Command | "path of script file" "path of folder1" "path of folder2" "path of folder3"... |
Input | specify some folders |
Action | This is a simple tool to show difference of PAR and directory contents. |
Script file | diff_folder.py |
Caution | Because it checks difference of files' existence and size only, it cannot detect broken files. Use MultiPar to see precise status of source files. |
  This sample uses list command of par2j. While it lists source files in the PAR2 set, it doesn't verify them. After comparison with current directory-tree, it paints blue color for additional files, red color for missing files, and yellow color for files of different size.
Command | "path of script file" "path of file" |
Input | specify a PAR2 file |
Action | This is a simple tool to edit names of source files in PAR2 files. Because it works in a single file, you don't need to set path of another application. |
Script file | par2_rename.py |
Caution | The modified PAR2 files by this tool are different from formal PAR2 files for renamed filenames. When someone generates new PAR2 files for renamed filenames by QuickPar/MultiPar, the PAR2 files are incompatible with these modified PAR2 files. |
  If you don't see debug output, you may rename the script file's extension to .pyw. Then, Command Prompt won't open.
 
How to use
Command | "path of script file" "path of file" |
Input | specify a JSON file |
Action | By setting /w option, par2j saves verification result on a JSON file. This sample uses the JSON file. |
Script file | read_json.py |
Caution | In the JSON file, par2j writes / as directory separator. |
 
MultiPar GUI can start script after creation.
The script file must be auto_c.py in the user's save folder.
A user may write any script in this file.
The script gets two parameters from GUI as below;
%1 = Path of a recovery file
%2 = Path of base directory of source files
  I put a sample in "tool\batch" folder. auto_c.py shows two parameters only.
 
MultiPar GUI can start script after verification or repair.
The script file must be auto_v.py or auto_vl.py in the user's save folder.
A user may write any script in this file.
The script gets three parameters from GUI as below;
%1 = Path of a recovery file
%2 = Path of base directory of source files
%3 = Exit code of the used client (refer the command-line manual)
  I put two samples in "tool\batch" folder. auto_v.py shows three parameters only. auto_vl.py shows lists of recovery files and source files, too.