Each new archive type is defined within individual [Archive Name] sections used for archive type name. The following parameters are used in this section:
ID=1a 4a 61 72 1b" sequence defines JAR archive identifier)
List="jar32 v -y" field the jar32 v -y archive_name command will be
composed.
^' symbol then the search for substring is performed
starting from the second symbol of the current line in the listing.
^'
symbol then search for substring is performed starting from the second symbol the
current line in the listing.
| Code | Description |
|---|---|
| n | file name |
| . | remove trailing spaces from file name and append name with dot |
| z | file size |
| c | file description |
| p | packed file size |
| d | day |
| t | month |
| TTT | three letters of 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 | file 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 | Chapter descriptions field |
| (<number>) | optional digits, some or all digits may be missing |
^' symbol then search for substring is performed starting
from the second symbol of the current line in the listing.
^' symbol then search for substring is performed starting
from the second symbol of current line in the listing.
| Command | Description |
|---|---|
| Extract | unpack |
| ExtractWithoutPath | unpack without paths |
| Test | test archive |
| Delete | delete files from archive |
| Comment | add archive comment |
| CommentFiles | add files comment |
| SFX | convert to SFX |
| Lock | lock archive |
| Protect | add recovery record |
| Recover | recover damaged archive |
| Add | add files |
| Move | move files to archive |
| AddRecurse | add files with recursive folder tree traversal |
| MoveRecurse | move files with recursive folder tree traversal |
Regular expressions (Perl5 syntax) can be used in the following parameters: FormatX, IgnoreStringX, Start, End. To specify that a pattern should be matched as a regular expression, enclose it in slashes ('/'). The following regexp flags can be used (if corresponding characters are placed after closing slash):
| Flag | Description |
|---|---|
i | ignore case |
x | extended (use explaining spaces) |
The following open source library is used to process regular expressions: PCRE (by Philip Hazel, copyright by the University of Cambridge, England).
When using regexps in the FormatX parameter, named strings
(of the form (?P<name>\w+)) are used to extract information
from listing lines. The following field names are available:
| Field | Description |
|---|---|
| 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 (CRC) |
For example to process 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 are 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*$/"
The following settings:
Start="/^..reading directory/" End="/^..listing completed/" Format0="/^[^\|]*\|(?P<size>[^\|]+)\|(?P<attr>[^\|]+)\|\s+(?P<name>.*?)\s*$/" IgnoreString0="/^---- ---- ---- ----/"
can be used to process this 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