;[Section name]
;  use format name here
;TypeName
;  optional parameter, is retained for compatibility purposes.
;  Allows to override format name, defined in the section name.
;ID (optional)
;  archive ID (2-digit hex numbers delimited with spaces)
;IDOnly (optional)
;  if 1, extension is ignored and only ID is used to detect archive type.
;  Otherwise both extension and ID (if present) are used.
;IDPos (optional)
;  ID position in archive. If not present, ID will be searched
;  in starting part of archive (first 128 Kb).
;Extension
;  archive format extension (without dot).
;List
;  command to produce listing. It will be appended with an archive name
;  It may also contain variables %%A with optional modifiers Q, q, W, P, S
;  In this case archive name will not be appended.
;Errorlevel (optional)
;  listing accepted only if errorlevel less than specified.
;IgnoreErrors  (optional)
;  if nonzero, archiver commands exit code will be ignored.
;  Use with caution.
;Start (optional)
;  any part of line in listing after which processing is started.
;  If text started from '^', it will be compared from second symbol
;  with lines beginning. Otherwise text looked anywhere in lines.
;End (optional)
;  any part of line in listing to stop processing.
;  If text starts from '^', it will be compared from second symbol
;  with lines beginning. Otherwise text looked anywhere in lines.
;Format0 ... FormatN
;  Listing format:
;  n - file name
;  . - remove trailing spaces from file name and append name with dot
;  z - unpacked size
;  c - file description
;  p - packed size
;  d - day
;  t - month
;  TTT - three letters month name (Jan, Feb, Mar, ...)
;  y - year
;  h - hours
;  H - hours modifier letter (a - a.m. time, p - p.m. time)
;  m - minutes
;  s - seconds
;  a - attributes
;  * - skip until first space or end of line
;  b - day of last access
;  v - month of last access
;  e - year of last access
;  x - hours of last access
;  l - minutes of last access
;  k - seconds of last access
;  j - day of creation
;  g - month of creation
;  f - year of creation
;  o - hours of creation
;  i - minutes of creation
;  u - seconds of creation
;  r - CRC (hex)
;  C - chapters info
;  (<digital parameters>) - optional digits, some or all digits may be missing
;IgnoreString0 ... IgnoreStringN (optional)
;  do not process these strings
;  If text starts from '^', it will be compared from second symbol
;  with lines beginning. Otherwise text looked anywhere in lines.
;
;Other items describe archive commands
;
;    The following variables may be used:
;
; %%A - Archive name.
;
; %%a - Short archive name.
;
; %%W - Temporary folder including the terminating slash.
;
; %%P - Password.
;
; %%R - Current archive folder.
;
; %%L - Filelist name. Filelist is the file containing names of files
;       to be processed by the external archiver.
;
; %%l - Filelist with short file names.
;
; %%F - Names of one or more files to be processed. If all names
;       cannot be placed in a single string, the archiver will be
;       executed several times until all file names are exhausted.
;       By default maximum total command length is 127, but you can
;       specify it directly after %%F, for example %%F512.
;       Variable %%F should be used only if the destination archiver
;       does not support filelists.
;
; %%f - The name of a single file to process. The archiver will be
;       executed several times until all file names are exhausted.
;       This variable should be used only if the destination archiver
;       does not support filelists or multiple file names on
;       the command line.
;
; %%E<errorlevel> - maximum acceptable command errorlevel.
;       For example, %%E2 indicates that errorlevels 0, 1 and 2
;       are acceptable. This variable may be specified in any place
;       of command. If it is absent, only errorlevel 0 is considered
;       as successful.
;
; %%S - Place in the command line to insert additional switches,
;       specified in the second string of "Add" dialog. If this
;       variable is absent, switches are added to end of command
;       line.
;
;    Variable modifiers Q, q, S, M, N, *, W, P can be used to change
;file names format details:
;
;    'Q' - quote names with spaces;
;    'q' - quote all names;
;    'S' - use '/' instead of '\' in pathnames;
;    'M' - transfer folder names to archiver as 'foldername\*.*';
;    'N' - transfer folder names to archiver as 'foldername';
;    '*' - use '*' mask to select all files. This modifier
;          overrides "All files mask" parameter for single
;          archiver command;
;    'W' - use name only, without path;
;    'P' - use path only, without name;
;    'A' - use ANSI encoding.
;
;    These modifiers may be specified immediately after %%F, %%f, %%L
;or %%l variables without spaces. 'P' and 'A' also may be used with
;%%A and %%a. Several modifiers are allowed, for example %%LMN or
;%%F*QSN128 are valid. If neither 'M' nor 'N' modifier is specified,
;'N' is assumed. If both 'M' and 'N' are specified, both 'foldername'
;and 'foldername\*.*' will be transferred to archiver.
;
;    If a part of the external archiver command string is enclosed
;in {  } braces, it will be added to the resulting string only
;if this part contains at least one non-empty variable
;from those described above.
;
;    If an external archiver does not support a particular command,
;leave the corresponding string blank.
;
; Regular expressions notice.
;
;Now regular expressions can be used in parameters 'FormatX', 'IgnoreStringX',
;'Start', 'End'. Regular expression are parsed by PCRE library
;(ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/) which recognizes
;Perl5-compatible syntax. To specify that pattern should be matched as regular
;expression, enclose it in slashes ('/'). The following regexp flags can be
;used (if corresponding characters are placed after closing slash):
;    i - ignore case
;    x - extended (use explaining spaces)
;    m - multiline
;    s - "." matches new line characters also ('\n', '\r')
;
;When using regexps in 'FormatX' parameter, named strings are used to
;extract information from listing lines. The following field names are
;available:
;    name - file name with relative path (leading and trailing spaces
;        are trimmed)
;    description - file description
;    size - unpacked file size in bytes (non-digit characters are ignored
;        in this and all other numeric fields)
;    packedSize - packed file size in bytes
;    attr - file attributes (A - archive, R - readonly, S - system, C -
;        compressed, H - hidden, D - directory)
;    cYear, cDay, cMonth, cHour, cMin, cSec - creation time
;    mYear, mDay, mMonth, mHour, mMin, mSec - modification time
;    mAMPM, mMonthA - extended time fields for modification time
;    aYear, aDay, aMonth, aHour, aMin, aSec - access time
;    CRC - 32 bit file Cyclic Redundancy Checksum
;
;------------------------------------------------------------------------
;Several examples of new syntax:
;
;to parse the following listing:
;>>>
; Volume in drive D is work
; Volume Serial Number is xxxx-xxxx
;
; Directory of D:\works\MultiArc\final\Formats
;
;15.11.2004  07:15    <DIR>          .
;15.11.2004  07:15    <DIR>          ..
;14.11.2004  00:46             5 632 Ace.fmt
;14.11.2004  00:46             4 608 Arc.fmt
;14.11.2004  00:46             6 656 Arj.fmt
;14.11.2004  00:46             6 144 Cab.fmt
;15.11.2004  06:07            56 832 Custom.fmt
;15.11.2004  07:14             1 551 custom.ini-re
;15.11.2004  07:11            54 344 Formats.jkr
;14.11.2004  00:46             4 608 Ha.fmt
;14.11.2004  00:46             6 144 Lzh.fmt
;15.11.2004  07:15                 0 out
;14.11.2004  00:46             6 144 Rar.fmt
;14.11.2004  00:46             9 216 TarGz.fmt
;14.11.2004  00:46             6 656 Zip.fmt
;              13 File(s)        168 535 bytes
;               2 Dir(s)  37 840 883 712 bytes free
;<<<
;the following settings can be used:
;
;Start="/^ Directory of/"
;End="/File\(s\)/"
;Format0="/^(?P<cDay>\d+).(?P<cMonth>\d+).(?P<cYear>\d+)\s+ (?P<cHour>\d+):(?P<cMin>\d+)\s+(?P<packedSize>[\d\xff]+)\s(?P<name>.*?)\s*$/"
;
;
;these settings:
;
;Start="/^..reading directory/"
;End="/^..listing completed/"
;Format0="/^[^\|]*\|(?P<size>[^\|]+)\|(?P<attr>[^\|]+)\|\s+(?P<name>.*?)\s*$/"
;IgnoreString0="/^---- ---- ---- ----/"
;
;can be used to parse the following kind of listing:
;>>>
;jkRes utility version 002
;  pack/unpack tool to work with jkRes resource bundles
;
;..listing files from resource bundle
;..reading directory...12 items found
;---- ---- ---- ----
;    zlib |     5632 | A.... | Ace.fmt
;    zlib |     4608 | A.... | Arc.fmt
;    zlib |     6656 | A.... | Arj.fmt
;    zlib |     6144 | A.... | Cab.fmt
;    zlib |    56832 | A.... | Custom.fmt
;    zlib |     4608 | A.... | Ha.fmt
;    zlib |     6144 | A.... | Lzh.fmt
;    zlib |     6144 | A.... | Rar.fmt
;    zlib |     9216 | A.... | TarGz.fmt
;    zlib |     6656 | A.... | Zip.fmt
;    zlib |    13012 | A.... | Custom.ini
;    zlib |     1072 | A.... | custom.ini-re
;---- ---- ---- ----
;..listing completed
;..done
;<<<


[JAR]
TypeName=JAR
ID=1a 4a 61 72 1b
IDOnly=1
IDPos=14
Extension=j
List="jar32 v -y"
Errorlevel=1
Start="^-------"
End="^Total files listed: "
Format0="* nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
;       "         0 ....D Win-32  Solid   10-12  2003-05-06 10:22:18 2003-05-06 10:22:18
Format1="zzzzzzzzzz aaaaa               CCCCCCC  yyyy-tt-dd hh:mm:ss ffff-gg-jj oo:ii:uu"
Format2="                                                            eeee-vv-bb xx:ll:kk"
Extract=jar32 x -y {-g%%P} %%A @%%LMq
ExtractWithoutPath=jar32 e -y {-g%%P} %%A @%%LMq
Test=jar32 t -y %%A
Delete=jar32 d -y %%A @%%LNMq
Comment=jar32 c -z -y %%A
CommentFiles=jar32 c -y %%A @%%LMq
SFX=
Lock=jar32 y -jl -y %%A
Protect=jar32 y -hk -y %%A
Recover=jar32 rh -y %%A
Add=jar32 a -y {-g%%P} {%%S} %%A @%%LMq
Move=jar32 m -y {-g%%P} {%%S} %%A @%%LMq
AddRecurse=jar32 a -r -y {-g%%P} {%%S} %%A @%%LMq
MoveRecurse=jar32 m -r -y {-g%%P} {%%S} %%A @%%LMq
AllFilesMask="*.*"
;
;Because of complicated listing, *.j archives with commented files
;cannot be correctly treated with FAR's CUSTOM.FMT. Therefore,
;the command "CommentFiles" must be used very carefully. Don't comment
;files of *.j archives if you want to manage them using FAR!
;If you face with *.j archive(s) having commented files, use the
;commands "jar32 v archive.j | more" and "jar32 x archive.j" to
;view and to extract the content, respectively. Also you can extract
;whole content of such archives with FAR's command <Shift-F2>!
;

[IMP]
TypeName=IMP
ID=49 4D 50 0A
IDOnly=1
IDPos=0
Extension=imp
List="imp l -y"
Errorlevel=1
Start="^---------"
End="^Total: "
Format0="zzzzzzzzzz TTT dd yyyy hh:mmH  aaaaa nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
Extract=imp e {-pt%%R} -y %%A @%%LMA
ExtractWithoutPath=imp e -y -p- %%A @%%LMA
Test=imp t -y %%A
Delete=imp d -r -y %%A @%%LMA
Comment=imp c -i -y %%A
CommentFiles=imp c -y %%A @%%LMA
SFX=
Lock=
Protect=imp r -e -y %%A
Recover=imp b -y %%A
Add=imp a -y {%%S} %%A @%%LMA
Move=imp a -d -y {%%S} %%A @%%LMA
AddRecurse=imp a -r -pl -y {%%S} %%A @%%LMA
MoveRecurse=imp a -d -r -pl -y {%%S} %%A @%%LMA
AllFilesMask="*.*"

[AIN]
Extension=ain
List="ain v -y"
Errorlevel=1
Start="    Имя файла"
End=" файлов     "
Format0="nnnnnnnnnnnnnnnnnnnnnnn zzzzzzzz  dd tt yy  hh mm ss"
Extract=ain x -y %%A @%%LM
ExtractWithoutPath=ain e -y %%A @%%LM
Test=ain t -y %%A @%%LM
Delete=ain d -y %%A @%%LM
Comment=
CommentFiles=
SFX=
Lock=
Protect=
Recover=
Add=ain a -y %%A @%%LM
Move=ain m -y %%A @%%LM
AddRecurse=ain a -r -y %%A @%%LM
MoveRecurse=ain m -r -y %%A @%%LM
AllFilesMask="*.*"

[UC2]
TypeName=UC2
ID=55 43 32 1A
IDPos=0
IDOnly=1
Extension=uc2
List="uc v"
Errorlevel=1
Start="^--> Directory of"
End=" matching file"
Format0="nnnnnnnn.nnnnnn zzzzzzzzz  TTT-dd-yyyy  hh:mm:ss"
Extract=uc xf %%a @%%lM
ExtractWithoutPath=uc ef %%a @%%lM
Test=uc tf %%a
Delete=uc df %%a @%%lM
Protect=uc pf %%a
Recover=uc tf %%a
Add=uc af %%a @%%lM
Move=uc mf %%a @%%lM
AddRecurse=uc asf## %%a @%%lM
MoveRecurse=uc msf## %%a @%%lM
AllFilesMask="*.*"
;
;Import the file ...Far\Addons\Archivers\FARUC2.REG into the
;Win32 Registry, and you will be able to view (F3) and extract (F4)
;content of *.uc2 archives with complex directory structure!
;Properly replace Type0 of FARUC2.REG with Type1, Type2 etc,
;if you've made some file associations before (the 1st file
;association of the FAR manager has Type0)...
;

[InstallShield]
ID=13 5d 65 8c
IDPos=0
IDOnly=1
Extension=Z
List="icomp -l"
Errorlevel=7
IgnoreErrors=1
Start="^ ========"
End="^                ------"
Format0=" tt-dd-yy hh-mm zzzzzzzz aaaa pppppppp nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
Extract=icomp -d -i -h -o %%A %%fWQ %%fP
ExtractWithoutPath=icomp -d -h -o %%A %%fWQ %%fP
Test=icomp -dt -i %%A %%fWQ %%fP
Delete=icomp -r -h %%f %%A
Comment=
CommentFiles=
SFX=
Lock=
Protect=
Recover=
Add=icomp -h %%fQ %%A
Move
AddRecurse=icomp -h -i %%fQ %%A
MoveRecurse=
AllFilesMask="*.*"

[Limit]
TypeName=Limit&
ID=4C 4D 1A
IDonly=0
Extension=lim
List=limit l
Start=^---------
Format0="  nnnnnnnn.nnn zzzzzzzz pppppppp  aaaaa  dd-tt-yy hh:mm:ss"
End=^---------

[RK]
TypeName=RK
IDOnly=1
Extension=rk
List="rk -vv"
IgnoreErrors=1
Start="Archive name:"
Format0="           nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
Format1="         zzzzzzzzz"
Format2="                   ppppppppp"
Format3="             aaaaa"
Format4="               j(j)-g(g)-ffff"
Format5="               oo:ii:uu"
Format6="                   d(d)-t(t)-yyyy"
Format7="                   hh:mm:ss"
Format8="                 b(b)-v(v)-eeee"
Format9="                 xx:ll:kk"
Format10="        rrrrrrrr"
IgnoreString0="^BitsPerByte ="
Extract=rk -x %%A @%%LMA
ExtractWithoutPath=rk -e %%A @%%LMA
Test=rk -i %%A
Delete=
Comment=
CommentFiles=
SFX=
Lock=
Protect=
Recover=
Add=rk {%%S} -mx3 -Ar+s+h+ %%A @%%LMA
Move=
AddRecurse=rk {%%S} -mx3 -Ar+s+h+ -r %%A @%%LMA
MoveRecurse=
AllFilesMask="*"

[7z]
TypeName=7z
ID=37 7A BC AF 27 1C
IDPos=
IDOnly=1
Extension=7z
List=7z l -- %%AQ
Start="^-----"
End="^--"
Format0="yyyy tt dd hh mm ss aaaaa zzzzzzzzzzzz pppppppppppp  nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
Extract=7z x {-p%%P} -r0 -y -scsDOS -- %%A @%%LQMN
ExtractWithoutPath=7z e {-p%%P} -r0 -y -scsDOS -- %%A @%%LQMN
Test=7z t {-p%%P} -r0 -scsDOS -- %%A @%%LQMN
Delete=7z d {-p%%P} -r0 -ms=off -scsDOS -- %%A @%%LQMN
Add=7z a {-p%%P} -r0 -t7z {%%S} -scsDOS -- %%A @%%LQMN
AddRecurse=7z a {-p%%P} -r0 -t7z {%%S} -scsDOS -- %%A @%%LQMN
AllFilesMask="*"

[rpm]
TypeName=rpm
ID=ED AB EE DB
IDPos=
IDOnly=1
Extension=rpm
List=7z l -- %%AQ
Start="^-----"
End="^--"
Format0="yyyy tt dd hh mm ss aaaaa zzzzzzzzzzzz pppppppppppp  nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
Extract=7z x {-p%%P} -r0 -y -scsDOS -- %%A @%%LQMN
ExtractWithoutPath=7z e {-p%%P} -r0 -y -scsDOS -- %%A @%%LQMN
Test=7z t {-p%%P} -r0 -scsDOS -- %%A @%%LQMN
AllFilesMask="*"

[cpio]
TypeName=cpio
ID=
IDPos=
IDOnly=0
Extension=cpio
List=7z l -- %%AQ
Start="^-----"
End="^--"
Format0="yyyy tt dd hh mm ss aaaaa zzzzzzzzzzzz pppppppppppp  nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
Extract=7z x {-p%%P} -r0 -y -scsDOS -- %%A @%%LQMN
ExtractWithoutPath=7z e {-p%%P} -r0 -y -scsDOS -- %%A @%%LQMN
Test=7z t {-p%%P} -r0 -scsDOS -- %%A @%%LQMN
AllFilesMask="*"

[deb]
TypeName=deb
ID=
IDPos=
IDOnly=0
Extension=deb
List=7z l -- %%AQ
Start="^-----"
End="^--"
Format0="yyyy tt dd hh mm ss aaaaa zzzzzzzzzzzz pppppppppppp  nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
Extract=7z x {-p%%P} -r0 -y -scsDOS -- %%A @%%LQMN
ExtractWithoutPath=7z e {-p%%P} -r0 -y -scsDOS -- %%A @%%LQMN
Test=7z t {-p%%P} -r0 -scsDOS -- %%A @%%LQMN
AllFilesMask="*"

[InnoSetup5]
TypeName=InnoSetup5
ID=49 6E 6E 6F 20 53 65 74 75 70 20 53 65 74 75 70 20 44 61 74 61 20 28 35 2E
IDOnly=1
List=innounp -v -m
Errorlevel=1
Start="^---------"
End="^---------"
Format0="zzzzzzzzzz  yyyy tt dd hh:mm  nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
Extract=innounp -x -m {-c%%R} %%A {@%%LMQ}
ExtractWithoutPath=innounp -e -m {-c%%R} %%A {@%%LMQ}
AllFilesMask="*.*"

[InnoSetup4]
TypeName=InnoSetup4
ID=49 6E 6E 6F 20 53 65 74 75 70 20 53 65 74 75 70 20 44 61 74 61 20 28 34 2E
IDOnly=1
List="innounp -v -m"
Errorlevel=1
Start="^---------"
End="^---------"
Format0="zzzzzzzzzz  yyyy tt dd hh:mm  nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
Extract=innounp -x -m {-c%%R} %%A {@%%LMQ}
ExtractWithoutPath=innounp -e -m {-c%%R} %%A {@%%LMQ}
AllFilesMask="*.*"

[InnoSetup3]
TypeName=InnoSetup3
ID=49 6E 6E 6F 20 53 65 74 75 70 20 53 65 74 75 70 20 44 61 74 61 20 28 33 2E
IDOnly=1
List="innounp -v -m"
Errorlevel=1
Start="^---------"
End="^---------"
Format0="zzzzzzzzzz  yyyy tt dd hh:mm  nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
Extract=innounp -x -m {-c%%R} %%A {@%%LMQ}
ExtractWithoutPath=innounp -e -m {-c%%R} %%A {@%%LMQ}
AllFilesMask="*.*"
