Las opciones de ARJ

En su momento no adopté ARJ, me parecía que su rendimiento era bajo, y las ganancias en cuanto a ratio de compresión, comparado con PKZip o LHARC no merecían la pena.

Si que en cambio lo utilicé puntualmente, y me sorprendió la cantidad de opciones de que disponía, recuerdo que la linea de comandos típica para comprimir al máximo en volúmenes era así:

ARJ a -jm -va A:\COPIA.ARJ *.*

Como acto rememorativo, he descargado la última versión de ARJ, y he extraído los comandos y opciones disponibles.

Example ARJ/ARJ32 commands:

Add files minus directory structure: ARJ a -e archive *.*
Add two files to archive: ARJ a archive name1 name2
Add files to archive with verification: ARJ a -jt archive *.*
Add files with archive damage protection: ARJ a -hk archive *.*
Add files with maximum compression: ARJ a -jm archive *.*
Add several directories of files: ARJ a archive … dir1 dir2 dir3
Add thousands of files to an archive: ARJ a -hm1 -r archive *.*
Add a chapter to an archive: ARJ ac archive c:\dir\*.* -r
Comment archive header only: ARJ c archive -zcmt.fil
Convert standard archive to chapter: ARJ cc archive
Convert chapter archive to standard: ARJ y archive -jb0
Delete the last chapter from an archive: ARJ dc archive *.*
Delete files completely from all chapters: ARJ d archive -jb* name1 name2
Strip archive comment only: ARJ c archive -zNUL
Extract files from archive: ARJ e archive
Extract maintaining directory structure: ARJ x archive
Extract new and newer files without query: ARJ e archive -u -y
Extract subdirectory from archive: ARJ e archive subdir\*.* -p1
Extract files to directory: ARJ x archive destdir\ *.*
Extract files to directory: ARJ x archive *.* -htdestdir
Extract files to directory with space: ARJ x archive "Program Files\ "
Extract files to directory with space: ARJ x archive "-htProgram Files"
Extract a Win95 archive to plain DOS: ARJ x archive -hf2
Extract all files present in chapter 10: ARJ x archive -jb10
Extract only files updated in chapter 10: ARJ x archive -jb10*
List files in archive: ARJ l archive
List chapters in chapter archive: ARJ lc archive
Move files to archive: ARJ m archive *.doc
Move files to archive deleting per volume ARJ m archive *.doc -d2 -v1440
Move files from archive: ARJ e -d archive *.doc
Recover files from a damaged archive: ARJ x archive -jr
Test integrity of files in archive: ARJ t archive
Test multiple ARJ archives: ARJ t *.ARJ -hr
Add files to a multiple volume archive: ARJ a -va a:archive *.*
Create up to 999 archive volumes: ARJ a -va a:archive
Extract from a multiple volume archive: ARJ x -v a:archive
Create a multiple volume self-extractor: ARJ a -va -je a:archive *.*
Convert archive to self-extractor: ARJ y -je1 archive

Backup drive C to drive A:
ARJ a A:\backup C:\ -a1 -b2 -r -vvas -wC:\ -js -jt -hk
Restore backup on drive A to drive C: ARJ x A:\backup C:\ -vv -y

More detailed ARJ/ARJ32 information:

Usage: ARJ <command> [{/|-}<switch>[-|+|<option>]…] <archive_name>[.ARJ]
[<base_directory_name>\] [<!list_name>|<path_name>|<wild_name>…]

or

ARJ @response_filename [ -& | -+ | -g? | -hy | -gpassword ]

<Commands>
ac: Add Chapter to chapter archive l: List contents of archive
cc: Convert archive to Chapter archive m: Move files to archive
dc: Delete last Chapter from archive n: reName files in archive
lc: List all Chapter labels o: Order files in archive
vc: Verbosely list all Chapters labels p: Print files to standard output
a: Add files to archive q: repair ARJ-PROTECTED archive
b: execute Batch or dos command r: Remove paths from filenames
c: Comment archive files s: Sample files to screen with pause
d: Delete files from archive t: Test integrity of archive
e: Extract files from archive u: Update files to archive
f: Freshen files in archive v: Verbosely list contents of archive
g: Garble files in archive w: Where are text strings in archive
i: check Integrity of ARJ.EXE x: eXtract files with full pathname
j: Join archives to archive y: copY archive with new options
k: purge chapter bacKup files

<Main defaults>
Save path information in archive
Save long filenames
Save/restore file date-time created and accessed in Win95/98/ME/2K/XP
Don't save drive and root in path information
Display comment ANSI sequences with built-in display handler
Prompt before overwriting output files
Use method 1 compression
Use binary mode
Use ! as list file symbol
The "ac" command is an abbreviation for "u -u2 -jb"
The "cc" command is an abbreviation for "y -jb"
The "dc" command is an abbreviation for "d -jb"
The "lc" command is an abbreviation for "l -jb*"
The "vc" command is an abbreviation for "v -jb*"

(ARJ32) Save/restore file date-time created and accessed in Win95/98/NT

ARJ32 uses OEM codepage by default. The "-hy" option sets ARJ32 to use
the ANSI codepage which is the Windows graphical environment default. ARJ32
self-extracting archives should be built using the "-hy" option.

<User prompt responses>
Yes – yes
No – no
Quit – abort out of ARJ
Always – always assume yes for current type of query
Skip – always assume no for current type of query
Global – always assume yes for all queries except diskette volume prompts
Command – prompt for and execute one DOS command

<Switches>
-: disables switch char p: match using full Pathnames
+: inhibits ARJ_SW usage p1: match Pathname with subdirs
+var: set environment variable q: Query on each file
@: set 1 token per response file line r: Recurse subdirectories
!: set list char (!) s: set archive time-Stamp to newest
&: set batch critical error handler s1: save original time-Stamp
#: select files by number s2: set archive time-Stamp
$: add/extract volume label s3: save both original time-Stamps
$A: add/extract label to drive A t: set file Type (default 0)
a: allow any file Attribute t0: set binary file type
a1: any files and directories t1: set C text file type
b: Backup changed files t1f: force C text file type
b1: Backup changed, reset archive bits t1g: set C text with graphics
b2: only reset archive bits u: Update files (new + newer)
b3: reset archive bit during restore u1: Update files (new + OLDER)
b4: do not restore bits, reset arc u2: Update files (new + different)
b5: do not restore any file attributes u3: Update files (new + CRC mismatch)
c: skip time-stamp Check u4: Update files (new + text size diff)
d: Delete added files v: enable multiple Volumes
asks permission before deleting v360: build 362000 byte volumes
d2: move deleting after each volume v500K: build 500000 byte volumes
e: Exclude paths from names v20M: build 20000000 byte volumes
e1: Exclude base dir from names va: auto-detect space available
f: Freshen existing files vda:\*.*: delete a:\*.*
f1: Freshen with OLDER files ve: use alternate volume naming
f2: Freshen with DIFFERENT files vi: inhibit diskette change test
f3: Freshen with CRC mismatched files vr50K: reserve 50000 bytes of
f4: Freshen with new + text size diff space on first volume
g: Garble with password vrr9K: reserve 9000 bytes of space
gstew: garble with password stew on every volume
g?: prompt for password vs: provide DOS command prompt
i: show no progress Indicator vsCMD: execute CMD before each vol
i1: show bar graph Indicator vv: beep between volumes
i2: show percentage and bar graph vw: keep Whole files in volumes
i3: total progress percentage vz: provide command with no echo
i4: total progress bar graph v360,v720,v1200,v1440: abbrevs
i5: total percentage and bar graph Volume options may be in any order
i6: total percentage and file graph except s and z which must be last
k: Keep a .BAK of ARJ archive w: assign Work directory
l: create List_name file wTMP: use TMP as work directory
lNAMES.LST: create NAMES.LST w!TMP: use TMP as work directory
l!NAMES.LST: append to NAMES.LST when archiving to removable media
m: with Method 0, 1, 2, 3, 4 x: eXclude selected files
m0: store (no compression) x*.EXE: exclude *.EXE files
m1: good compression (default) x!NAMES: exclude files in NAMES
m2: less memory and compression multiple exclusions are allowed
m3: FAST! less compression y: assume Yes on all queries except
m4: FASTEST! least compression diskette volume prompts
n: only New files (not exist) Use this switch for batch mode
o: On or after YYYYMMDDHHMMSS z: specify archive comment file
o: on today zARC.CMT: use ARC.CMT for comments
o19901225: on/after 12/25/1990 zNUL: use to strip comments
ob: Before YYYYMMDDHHMMSS
ob: before today
ob19901225: before 12/25/1990
oa: After YYYYMMDDHHMMSS (last access)
oa: on today
oa19901225: after 12/25/1990
oab: Before YYYYMMDDHHMMSS (last access)
oab: before today
oab19901225: before 12/25/1990
oc: After YYYYMMDDHHMMSS (created)
oc: on today
oc19901225: after 12/25/1990
ocb: Before YYYYMMDDHHMMSS
ocb: before today
ocb19901225: before 12/25/1990
od: no older than N Days
od5: five or less days old
odb: older than N days
odb3: over 3 days old
os: Greater or equal to file size
os100K greater or equal to 100K
osb: Less than file size
osb100K less than 100K

<Shifted switches>
h#: append date string to name hi: detailed display in Index files
h#1: append time string to name hk: enable ARJ-PROTECT data protection
h#2: append DHHMMSS to name disable ARJ-PROTECT when used with
h$: try to use longnames (obsolete) the "y" command
h!: minimize console window (ARJ32) hk: default amount of recovery data
ha: ignore readonly Attribute hk1: more recovery data
hb: select by file attribute/type hk9: max amount of recovery data
a – archive bit set hk!: enable ARJ-PROTECT only when
b – archive bit clear archiving to removable media
r – readonly hl: return error for Listfile error
s – system hm: increase file list capacity
h – hidden hm!: redirect -hm temp file
d – directory hm! : move temp file to XMS mem
n – normal file, not d,h,r,s,c,l hm!e:\ : move temp file to e:\
c – chapter label hn: specify non-existent filespec
l – volume label hn####: set #### as filespec
f – abbrev for n,d,r,s,h ho: Only extract files with matches
w – windows long filenames ho1: Only extract files without matches
hb: select all types hq: ignore open access error on adds
hbsh: select hidden, system only hq1: ignore open not found error on adds
hbd: select dirs only hq2: ignore access and not found on adds
hc: execute DOS Command at ARJ start hr: try to ignore archive errors
hcCLS: execute CLS hs: disable file Sharing
he: skip test of security Envelope ht: set Target directory
he1: set error on security Envelope htD:\DESTDIR
hf: set short filenames only hu: allow Update of volume archives
hf1: set longnames in file comment hv: check for ARJ version
or extract with W95LNAME.nnn hw: scroll save search filename display
hf2: use long filenames in DOS hw1: display only filenames with matches
hf3: set longnames in file comment hx: set default archive extensions
using shortname wildcards hx.arj.sdn
(in ARJ32, same as -hf1) hy: set ARJ32 to use ANSI codepage
hf4: set all files archived in Windows set ARJ to extract ANSI codepage
as Windows long filenames archive
hg: specify garble module filename hy1: force ARJ32 to use OEM codepage
hgGARBLE.COM: set GARBLE.COM as hy2: force ARJ32 to use ANSI codepage
name of garble module hz: specify ARJ-SECURE key file
hg!: specify use of 40 bit encryption

j#: store only CRC and not the file jp: Pause after each screenful
j#1: store only date, size, attributes jp50: pause, set page size to 50
j#2: restore file attributes jq: set string parameter
j#3: restore file dates jqstring: set parameter to string
j#4: restore file attributes and dates jr: Recover broken archive files
j$: do not process file DTA and DTC jr1: Recover badly broken archive files
ja: set P command to display ANSI js: Store archives by suffix
ja1: inhibit the display of comments default is arj, arc, lzh, pak, rar,
ja2: set P command to display filename zip, zoo, j, and uc2.
jb: set chapter backup processing js.zoo: store only .zoo files
jb0: clear chapter archive status jt: Test temporary archive by CRC
jb*: select all chapter backup files jt1: Test CRC and file contents
jc: exit after Count of files jt2: Test only added file contents
jc5: exit after 5 files or only files that exist on disk
jc nam1 nam2: exit after 2 files jt3: Test only file date-time and size
jd: ensure free Disk space ju: translate UNIX style paths
e -jd50K: skip file if<50000 free jv: set Verbose display
l -jd1000: set error if<1000 free jv1: set verbose list mode (CRC)
je: create self-extracting archive jv2: set verbose list mode (CRC/Chapter)
je1: create SFXJR archive (not ARJ32) jw: set extract output filename
jf: store/use Full specified path jwNEW.FIL: output to NEW.FIL
jf1: store/use path minus drive jx: start at eXtended position
jg: [OBSOLETE] jx10000: start at position 10000
jg1: [OBSOLETE] jy: suppress queries assuming Yes
jh: set Huffman buffer size a – append query
jh65535: set to 65535 bytes (max) c – create directory query
jh2048: set to 2048 bytes (min) d – delete files query
ji: create Index file k – disk space available query
jiINDEX.FIL: create INDEX.FIL n – new filename prompt
jk: Keep temp archive on error o – overwrite file query
jl: display only filespecs r – erase type-ahead before query
jm: set Maximum compression mode s – scanned enough text query
jm1: set faster Maximum compression v – proceed to next volume query
jn: restart volumes at fileName w – same as 'v' except for archives
jnBIN\X.COM: restart at BIN\X.COM on removable media
jn: get restart information from y – accept single character Y/N/A/Q
previously written index file jycdy: skip create, delete queries
jo: query when updating archive file in single character input mode
jo: extract to unique Output names jz: specify file for file comment
jo1: extract to unique Output names jzFIL.CMT: use FIL.CMT for comments
keeping file extension jzNUL: use to strip file comments

Environment variable setting:
set arj_sw=-jyry -jv -i1
set arj_sw=c:\arj.cfg

(ARJ32 uses ARJ32_SW instead of ARJ_SW)

set arj32_sw=-hy

ARJ DOS errorlevels:

0 -> success
1 -> warning (specified file to add to archive not found,
specified file to list, extract, etc., not found,
or answering negatively to "OK to proceed to next volume…"
prompt)
2 -> fatal error
3 -> CRC error (header or file CRC error or bad password)
4 -> ARJ-SECURITY error or attempt to update an ARJ-SECURED archive
5 -> disk full or write error
6 -> cannot open archive or file
7 -> simple user error (bad parameters)
8 -> not enough memory
9 -> not an ARJ archive
10 -> XMS memory error (read or write)
11 -> user control break
12 -> too many chapters (over 250)

The batch statement IF ERRORLEVEL 0 … means
if the errorlevel is EQUAL TO or GREATER THAN 0.

If the first two characters of an ARJ comment are "))" in a self-extractor,
then the self-extractor will accept the appended line as its command line.

)) -o
will force the self-extractor to overwrite existing files.

2 comentarios en “Las opciones de ARJ”

Deja un comentario