User's Manual for the ARJ/ARJ32 archiver program, October 2003 ARJ/ARJ32 software and manual are copyright (c) 1990-2003 by ARJ Software, Inc. All rights reserved. ** IMPORTANT NEWS **************************************************** Users of ARJ should read the WHATSNEW.TXT and UPDATE.TXT files that contain information about the latest improvements to ARJ. For ARJ32 users, please refer to the UPDATE32.TXT for the differences from ARJ. ********************************************************************** TOPICS COVERED IN THIS DOCUMENT ------------------------------- DEDICATION INTRODUCTION NEW USERS TERMINOLOGY MAJOR FEATURES OF ARJ ARCHIVER BENCHMARKS RELEASE NOTES YEAR 2000 COMPLIANCE STATEMENT WINZIP COMPATIBILITY TECHNICAL NOTES DEARJ AND REARJ PROGRAMS SYSTEM REQUIREMENTS INSTALLATION REGISTER STAMPING ARJ QUICK START TO USING ARJ HOW TO CREATE AN EXECUTABLE SELF-EXTRACTING ARJ ARCHIVE HOW TO CUSTOMIZE AN EXECUTABLE SELF-EXTRACTING ARJ ARCHIVE CONVERTING OTHER ARCHIVE FILES TO ARJ FORMAT HOW TO USE ARJ ARJ LIMITATIONS IMPORTANT NOTES TIPS TO USING ARJ EFFICIENTLY USING ARJ WITHIN OTHER PROGRAMS ARJMENU PROGRAM USING ARJ AS A BACKUP PROGRAM BACKUP TYPE ARCHIVES AND BACKUP FILES CHAPTER ARCHIVES WINDOWS 95 LONG FILENAME SUPPORT WINDOWS NT AND 2000 SUPPORT UNIVERSAL NAMING CONVENTION (UNC) ARJ-PROTECT DATA PROTECTION FEATURE ARJ ANSI COMMENT HANDLING THE FILESPEC "..." ARJ ERROR SITUATIONS ARJ DOS ERRORLEVELS ARJ USER ACTION PROMPTS ARJ ENVIRONMENT VARIABLE/CONFIGURATION FILE ARJ COMMAND LINE SYNTAX ARJ RESPONSE FILE SYNTAX ARCHIVE NAME WILDCARDING ARJ COMMANDS ARJ SWITCH OPTIONS ARJ COMMAND OPTIONS SAMPLE ARJ COMMANDS ARJ_SECURITY ENVELOPE KNOWN ARJ ISSUES/PROBLEMS ARJ ERROR MESSAGES COMMONLY ASKED QUESTIONS ARJ TECHNICAL SUPPORT ARJ AVAILABILITY ARJ INTERNET MAILING LIST ARJ WEB SUPPORT SDN EXTENSION FILES DISTRIBUTORS ACKNOWLEDGEMENTS USAGE AND DISTRIBUTION POLICY BRIEF BIOGRAPHY OF ARJ AUTHOR FINAL COMMENTS DEDICATION: The ARJ program is dedicated to God and to my family. From the beginning, our family decided that God would be the senior partner in our company and that our business practices would strive to reflect the principles that He has so graciously provided to the world in His Word. INTRODUCTION: ARJ is the result of a desire to use my interest in compression technology to produce an archiver for personal use on PCs and on minicomputers that provides power and excellent flexibility. This document is designed as an ARJ program reference manual and is not appropriate for novices to ARJ. The file named INTRO.TXT is intended for novices. Please note that the shareware versions of the ARJ programs may be slightly limited in functionality. See the UPDATE.TXT for more information. NEW USERS: Users new to the ARJ archiver should start reading the INTRO.TXT file instead of this document file. TERMINOLOGY: The following terms are used through this manual. ARCHIVE - This is a file containing one or more files in a compressed or non-compressed state and containing file related information such as filename and date-time last modified, etc. ARJ32 - Windows 32 bit console mode version of ARJ. ARJ32 supports the Win32 environment of Windows 95/98/NT/2000. ARJ FILE - This is an archive created by ARJ. BACKUP TYPE ARCHIVE - This is an ARJ archive that has the internal backup flag turned on. This feature is obsolete after ARJ version 2.50a. Current and future versions of ARJ will ignore the special flag set on file backups. Replacing this backup archive scheme is the chapter archive scheme. CHAPTER ARCHIVE - This is an ARJ archive that contains one or more backup chapters. A chapter archive stores a full backup and a series of incremental backups in a manner that saves disk space by not storing duplicate files. A chapter archive allows the user to recover a directory of files as they were when the backup chapter was made. In other words, if daily backup chapters of a source directory were made from Monday to Friday, one could recover the source directory as it was on Wednesday. Files that did not exist for the specified chapter backup will NOT be restored even if they existed in previous chapter backups. Other forms of backup and restore often restore files in a directory that had been deleted and are not wanted. COMPRESSION - The process of encoding redundant information into data requiring less storage space. COMPRESSION PERCENTAGE/RATIO - The percentage compression reported by ARJ is a variation of one of the TWO standard methods of expressing compression ratio in the technical literature. ARJ uses the compressed size / original size ratio. The other method is the inverse ratio. When ARJ reports 96% as the compression ratio, which means that the compressed file is 96 percent of the original size (very little compression). Other archivers use their own methods. LHARC uses the same ratio as ARJ. EXTRACTION or UNCOMPRESSION - The processing of recreating the exact information that was previously compressed. MARKING and UNMARKING - ARJ is indicating that the specified file is already in the archive and does not need to be updated in terms of file contents but only needs to have its chapter settings modified. Marking means that a new chapter is being added to the file's chapter range. Unmarking means that one or more chapters are being removed from a file's chapter range. SELF-EXTRACTION MODULE (SFX) - This is an archive that is an executable file that is capable of extracting self-contained files. TEXT MODE - In text mode, ARJ inputs the file using the C library text mode which translates the carriage return, linefeed control characters of MS-DOS to a single linefeed character. This saves space and provides the option for cross platform file extraction. On another platform, the host C library would change the single linefeed to the host text newline separator sequence. In addition, for platforms such as PRIMOS which set bit 8 in ASCII text characters, ARJ sets/resets bit 8 according to the platform extracted to. When extracting a text mode file to the same type of platform archived from, ARJ will NOT strip the 8-bit text to 7-bit text. VOLUMES - These are ARJ archives that are in sequence and have been created by a single ARJ command. Files in the volumes may span volumes in a split format. These volumes are usable archives. WINDOWS 9x - All versions of Windows 95, Windows 98, and Windows Millenium (ME). WINDOWS 2K - Windows 2000 WINNT - Windows NT MAJOR FEATURES OF ARJ: Currently provides excellent compression in terms of size reduction compared to the leading archivers including PKZIP 1.10, PKZIP 2.04, LHARC 1.13c, and LHA 2.13. ARJ is particularly effective with database files and documents. The ability to process and archive up to 50,000 files at one time for ARJ. ARJ32 can handle up to 100,000 files. The registered version of ARJ32 can archive over 2,000,000 files at one time. The registered version of ARJ can archive up to 260,000 files at one time. The ability to select files for archival by type and/or attribute. Support for Windows 9x long filenames in the Windows 9x/ME GUI DOS environment. ARJ32 also supports long filenames in Windows NT/2K. The ability to repair small amounts of archive damage (headers and file data) of an ARJ-PROTECTED archive. Archive and individual file comments with the option of inputting comments from a file. ARJ has MS-DOS 3.x international language support for the proper casing of filenames and text. The ability to put the entire ARJ command line in a response type file as in "ARJ @command.rsp". 32 bit CRC file integrity check. DOS volume label support. Default storing of specified pathnames to allow recovery of a directory structure. Empty directory support. Backup support in the chapter archive scheme which allows a series of backups to be included in a single archive so that one can recover any one of the backups. The advantage of chapters is that files that have not changed are saved only once in the archive. Test new archive before overwriting the original archive option. Archives that can span diskettes. This allows the user to backup a full hard disk drive to multiple floppies. Recovery of individual files is convenient because each diskette archive is an individual archive except for the split file portion. No need to use SLICE with ARJ. In addition, ARJ in disk spanning mode can support the use of 3.5 HD diskettes formatted at higher capacities than 1.44 MBytes. Moreover, ARJ can build these disk spanning archives on the hard disk drive for later transfer to diskettes. Archive file re-ordering facility with the option of sorting by file size, file extension, CRC value, date-time modified, filename, pathname, compression ratio, file attribute and more. String searching with context display within archive files. Built-in facility to recover files from broken archives. Self-extraction feature that is internal to the ARJ runfile. The SFX module is full-featured with a built-in help screen. ARJ also includes a smaller SFXJR module with fewer features. Multiple volume self-extracting archives. The ability to embed command line type options inside self-extracting archives and to execute a command after extraction. Internal string data integrity check in ARJ to resist hacking a la LHARC to ICE. Archive security envelope "seal" feature to resist tampering with secured archives. This feature disallows ANY changes to a secured archive. Even the archive comments can NOT be changed without removing the "seal". Password option to encrypt archived files. Text mode data compression option to enable movement of text files from one host machine to another. Text mode also results in slightly greater file size reduction on MS-DOS machines. File extraction to screen in a paged mode to permit browsing through an archive. Specification of the files to be added to or exclude from an archive via one or more list files. In addition, ARJ can generate a list file. Specification of files to be excluded from processing by ARJ. Sub-directory recursion during compression and extraction. ARCHIVER BENCHMARKING: This is information for those who plan to publish benchmark test results comparing ARJ with other file archivers. The ARJ "-jm" compression is intended to demonstrate the best that ARJ can do in terms of size reduction. However, the ARJ "-jm1" compression is almost as good in terms of size reduction and is faster. The ARJ "-e" option is necessary during size benchmarks because ARJ by default stores the entire specified pathname in the archive as opposed to other archivers which strip path specifications. Example command: ARJ a benchmrk -e -jm1 files\*.* The very size of the ARJ runfile adds significantly to the compression and extraction times when testing smaller archives. RELEASE NOTES: The use of ARJ/ARJ32 in a business, commercial, institutional, or government environment requires a license. However, business, commercial, institutional and government users may use ARJ for evaluation purposes for a period of 30 days. See the LICENSE.TXT for full details. A government agency may NOT require others to use ARJ without obtaining a license. The inclusion of any of the ARJ software (ARJ, ARJ32, DEARJ, ARJSFX, ARJSFXV, ARJSFXJR, ARJSFX32, REARJ, REARJ32) with software and/or hardware for distribution requires a license. There is an exception for freeware/shareware software collections. See the file LICENSE.TXT for details. While evaluating ARJ, you should use the "-jt" (test archive) option to verify new ARJ archives of your data. This version has been tested under DOS 2.11, 3.3, 4.01, 5.0, 6.0, and 6.2x. It also runs under the MSDOS prompts of Windows 3.x, Windows 95/98/Millenium, Windows NT, Windows 2000, OS/2 2.0, Warp 3, and Warp 4. ARJ32 has been tested under Windows NT 4.0 service pack 3, Windows 95, Windows 98, Windows Millenium, and Windows 2000. Preliminary testing under Windows XP has been successful. Here is a suggested command that will test ARJ on all of your files: ARJ a testvol c:\ -v360dtestvol.* -xtestvol.* -y -jf -jt1 -r YEAR 2000 COMPLIANCE STATEMENT: See the file YEAR2000.TXT. This version of ARJ has been modified to allow the specification of the century for the ARJ date options "-o" and "-ob". Prior to this version, the ARJ date options would accept a date in the form of YYMMDD. With this version, ARJ will accept dates in both YYMMDD and YYYYMMDD formats. ARJ will presume that any year specifications beginning with 19, 20, and 21 are YYYY type specifications and any year specifications beginning with 80, 81, 82 .... 99, 00, 01 .... 18 are YY type specifications. Example: -o980105 -> on or after Jan 5, 1998 -o19980105 -> on or after Jan 5, 1998 -o100105 -> on or after Jan 5, 2010 -o20100105 -> on or after Jan 5, 2010 -o201001051200 -> on or after Jan 5, 2010 12:00 P.M. -o100105 -> on or after Jan 5, 2010 12:00 A.M. WINZIP COMPATIBILITY: Winzip 7.0 has compatibility issues with the copyright header of ARJ 2.70 and 2.71. With this release, the header was modified to allow compatibility with Winzip 7.0. Winzip 8.0 does NOT have this compatibility issue with ARJ 2.70 and 2.71. ARJ32.EXE is not supported by Winzip at this time. However, if you rename ARJ32.EXE to ARJ.EXE, Winzip may support it. TECHNICAL NOTES: A detailed technical description of the ARJ archive format is available in the UNARJ distribution archive. This archive contains a description of the archive header formats as well as C source code for an ARJ archive extractor and lister program. This UNARJ source code has been made portable to several platforms including UNIX, NEXT, DOS, and AMIGA. However, we only distribute and support the PC versions. DEARJ and REARJ PROGRAMS: DEARJ is the ARJ program without the archive creation/modification functions, the "w" command, the self-extractors, and the "-jt1" and "-jt2" switches. The UNREGISTERED version of DEARJ CANNOT handle multiple volume archives. DEARJ is normally not needed because ARJ now has a multiple volume self-extractor which provides the same functions. Registration of REARJ will enable a number of additional enhancements including environment variable usage, !listfile capability and selection by file date-time. See the LICENSE.TXT and ORDERFRM.TXT for more information. ARJR is no longer available. UNARJ and DEARJ are NOT the same program. ARJ32 does not have a DEARJ32.EXE. SYSTEM REQUIREMENTS: The ARJ software package is designed to work under DOS versions and DOS boxes from 2.11 and above. However, certain features have an OS limitation under DOS versions prior to DOS 3.0 as in access to the self-extractors and to the built-in help information. To get the ARJ help screens and the ARJ self-extraction creation to work, ARJ.EXE MUST be located in the CURRENT directory. This limitation exist only in newer versions of ARJ to save on memory usage. Within the Windows 9x/Me DOS box environment, ARJ supports the use of Windows 9x/ME long filenames. This feature ONLY works in the Windows 9x DOS box. It does not work under DOS 6.x nor does it work under Windows NT/2000. ARJ32 runs only under Windows 95/98/ME/NT/2K graphical environment. INSTALLATION: We assume that you have a copy of the self-extracting ARJ module named ARJ###.EXE where "###" represents the ARJ version number. Typing ARJ### [RETURN] at the DOS command prompt will initiate the self-extraction feature. ARJ### will by default extract its files to the "C:\ARJ" directory. When ARJ### starts, you will see several lines of text describing ARJ and then a line asking if you wish to continue extraction. Entering "yes" or "y" will continue the extraction. If there are any duplicate filenames in the destination directory, the program will prompt you for overwriting. You can enter "yes", "no", or "quit". To complete the installation, you will need to add the destination directory ("C:\ARJ" is the default) to the PATH statement in your AUTOEXEC.BAT file. For Windows 95/98/ME, you should add the statement set path=%path%;c:\arj to the end of the AUTOEXEC.BAT file. Do NOT insert any spaces for added clarity. ARJCRYPT.COM is an ARJ accessory encryption module for USA users only. It is available on the ARJ website. ARJ32_C.DLL is an ARJ32 accessory encryption module for USA users only. It is available on the ARJ website. You may, of course, prefer to use ARJ 1.00 or higher to extract the contents of ARJ###.EXE file manually. Example: ARJ e ARJ###.EXE C:\ARJ\ REGISTER STAMPING ARJ: *** THIS RELEASE HAS A SHORT RANDOM TIME DELAY AT THE START *** OF EXECUTION. THE REGISTERED VERSION DOES NOT HAVE THIS *** DELAY. THIS DELAY MAY BECOME LENGTHY IN A YEAR OR SO. *** REMINDER: ARJ 2.7x uses a new registration scheme which *** obsoletes all previous registration keys. *** Register stamping ARJ removes the startup time delay and *** enables the enhanced features. At this release, the *** enhanced features include the support for archiving a *** large number of files (ARJ -> 260,000, ARJ32 -> 2,000,000), *** as well as enhancing REARJ. If, when you purchase an ARJ license, you choose to receive your ARJ key by email, you will need to put the emailed key data into a file named REGISTER.DAT in the same directory as the ARJ software programs. Then you need to execute REGISTER.EXE with either the -ARJ option or the -ARJ32 option depending upon your software. Please note that the registration key for ARJ does not work with ARJ32 and vice-versa. A more detailed explanation can be found in the file REGISTER.TXT. QUICK START TO USING ARJ: See the document INTRO.TXT. HOW TO CREATE AN EXECUTABLE SELF-EXTRACTING ARJ ARCHIVE: The command "ARJ y -je archive" will create a full featured self-extracting archive from an already built archive. The command "ARJ y -je1 archive" will create a smaller self-extracting archive. Syntax: ARJ y -je archive produces archive.EXE from archive.arj ARJ a -je archive files produces archive.EXE from files ARJ lets users create multiple volume self-extracting archives. Syntax: ARJ a -je archive -v360K files produces archive.EXE, archive.e01, archive.e02 .... An alternative mode (-ve option) lets you create a multiple volume self-extracting archive where the volumes all end in .EXE. Only the first volume is the extractor module. The other volumes end in .EXE for use on an Internet download website. Netscape and Explorer will properly download .EXE files. Syntax: ARJ a -je archive -ve360K files produces archive.EXE, arch001.EXE, arch002.EXE .... Under DOS systems other than 2.11, 3.2, 3.3, 4.0, 5.0, 6.x, and 7.0, you may have to rename the self-extract module to ARJSFX.EXE to do the extraction. See the file SFX.TXT for more information. HOW TO CUSTOMIZE AN EXECUTABLE SELF-EXTRACTING ARJ ARCHIVE: It is possible to customize an ARJ self-extracting archive to execute command line options as if the user typed in the options. Upon execution, an ARJ self-extractor checks its DOS command line for any options that the user might have entered (ARJSFX -t). If the self-extractor does not find any options, it will look for the self-extractor archive comment. If the first line of the comment begins with two right parentheses, the self-extractor will execute any command options following the two right parentheses. See the file SFX.TXT for more information. CONVERTING OTHER ARCHIVE FILES TO ARJ FORMAT: Included with this software is the program REARJ. This program can be used to individually or collectively convert archive files from other formats to the ARJ format. The command "REARJ *.ZIP *.ARC *.LZH" will convert all ZIP, ARC, and LZH archives in the current directory to the ARJ format. See the REARJ.TXT for more information about REARJ. HOW TO USE ARJ: If you type ARJ [return], you will see a simple help screen. If you type ARJ -? [return], you will see more detailed help information. ARJ LIMITATIONS: ARJ will accept up to: 64 filenames/wildnames on command line 50,000 resulting filenames for ARJ 100,000 resulting filenames for ARJ32 (see below for registered versions) 50,000 filenames/wildnames to exclude 16,000 filenames to sort 16,000 ARJ filenames resulting from wildnames 2,048 character comments (up to 25 lines or 1 file) The registered version of ARJ32 will accept over 2,000,000 filenames. The registered version of ARJ will accept up to 260,000 filenames. However, for evaluation purposes, ARJ/ARJ32 will process up to the larger limit when using the -j#1 option. Example: ARJ a archive c:\*.* d:\*.* -r -j#1 Note that using the option "-j#1" does not store any of the contents of the files. Only the name, date, and size is stored. For compressing, ARJ requires approximately 300,000 bytes plus the memory necessary to store all of the pathnames to be archived when using the default compression method (-m1). For extracting, ARJ requires approximately 175,000 bytes plus. The program DEARJ requires approximately 125,000 bytes plus. *** ARJ will accept files with sizes up to 2 gigabytes in size. *** ARJ will only build archives of 2,000,000,000 bytes or less. There is no limitation on the number of files that can be stored in one archive. However, when archiving a large number of files, ARJ will use additional disk space to manage its internal list of those filenames. Example: ARJ a -r archive \*.* -hm ARJ currently does not see that wildnames like "C:*.*" and "C:\*.*" can actually represent the same thing. ARJ would expand each of those two wildnames into a list that could be up to twice as long as necessary. When updating an archive, ARJ creates a temporary file named ARJTEMP.$nn in the current directory or special work directory if specified (-hm!F:\). While ARJ is scanning a wildcard filespec, ARJ will change the name of the target archive to ARJTEMP.$nn while the scan is proceeding to avoid including the archive itself in an add or move command. Also, as a result, you cannot add a file named ARJTEMP.$nn to an ARJ archive. Please note that the name of this temporary file may change at a future revision of ARJ. In this release, ARJ will not use memory for filenames that it does not select by name or by file attribute (archive bit, file type). IMPORTANT NOTES: When using the "-w" working directory switch, ARJ does not check on space availability before overwriting the original archive if it exists. Be sure that you have enough disk space for the new archive before using the "-w" switch. If ARJ aborts in this situation because of disk space, ARJ will keep the temporary archive. By default, ARJ does not see hidden or system files. ARJ will process system and hidden files when you either specify the "-a" switch or use the new "-hb" switch. Like LHARC and PKZIP, ARJ requires extra disk space to UPDATE an archive file. ARJ will backup the original archive while it creates the new archive, so enough room must be available for both archives at the same time. Unlike PKZIP, ARJ does not require additional work space when CREATING a new archive. Currently, ARJ will not extract overwriting a readonly file unless the "-ha" option is specified. TIPS TO USING ARJ EFFICIENTLY: You should use a software or hardware disk cache to speed up ARJ access. Diskette drives should NOT be write-delay enabled. Write-delay would prevent ARJ from truly verifying diskette writes. When archiving to diskettes, you should use the "-w" option to set a working directory on your RAMDRIVE or hard disk drive to speed up building the archive. You should use the "-jt" or "-jt1" option when archiving to diskettes or when you really want to be sure that ARJ will be able to extract what you have archived. There are cases where your hardware or memory resident software will corrupt your work, so the "-jt" options are excellent insurance. If you have bad sectors on your diskettes and verify is turned off, DOS will not tell you about diskette errors until it is too late. These errors are NOT RECOVERABLE. In the news are reports that many floppy disk drives are capable of corrupting data on a random basis especially when the computer is busy with many tasks at once. It is said that this problem is due to faulty floppy drive chip design. We recommend that no other disk intensive tasks be run while using the diskette drive. Using the "-js" option saves time by not compressing archives of PKZIP, LHA, ARC, ZOO, ARJ, etc. You should use the "-e" option whenever you do not need to store pathnames in an archive that you are creating. This will save space. Convert an ARJ archive into a self-extracting archive with a command like the following: ARJ y archive -je To capture a comment from an ARJ archive, use the following command: ARJ e archive ... -zcomment.txt (the "..." is significant). ARJ has several compression methods that provide size/time tradeoffs. Method 4 "-m4" is about twice as fast as method 1. The "-jm1" and "-jm" options modify the "-m1" option to provide even greater compression at a cost in time. USING ARJ WITHIN OTHER PROGRAMS: Since ARJ uses over 300,000 bytes of memory during compression, it is difficult to use ARJ in a large application program unless that program swaps itself out of memory when it executes DOS commands like ARJ. However, there is at least one shareware program available that will automatically swap your large application program out of memory whenever it shells out to DOS to execute a command. The program SHROOM by Davis Augustine should be able to solve this memory problem for you. The latest version as of 03/11/92 is named SHROM19C.ZIP on Channel One BBS. This is not an endorsement of the product SHROOM. The easiest way we have found to use this product is to type: SHROOM COMMAND.COM SHROOM -v COMMAND.COM will let you see SHROOM in action when you shell out to execute a DOS command. ARJ32 does not have this memory limitation. ARJ HELP HYPERTEXT PROGRAM: ARJ-Help is an electronic book (brand named Window Book (TM)) that allows the user to discover easily how to use ARJ. It runs under DOS. It is very fast and has a rich set of features which include full-text search, hypertext links, a table of contents that can be reorganized to your needs, a complete index, and much more. The current version can be found on some BBSes as ARJHLP24.EXE. Window Book, Inc. P.O. Box 390697 Cambridge MA 02139 USA TEL: 617-661-9515 or 800-524-0380. FAX: 617-354-3961 ARCHIVER UTILITIES THAT SUPPORT THE ARJ FORMAT: The following are some other utilities that facilitate the use of ARJ. This list is not all inclusive nor is it meant as a personal recommendation. ARCHIVE MANAGER PRO - Archiver shell ARJMENU - ARJ shell SHEZ - Archiver shell ARCMASTER - Archiver shell ZGEN - Archiver shell ACZAR - Archiver shell ARJVIEW - ARJ shell AVIEW - BBS archive viewer WINZIP - Windows archiver shell TOTAL COMMANDER - Windows archiver shell, file manager ARJ Folder - Windows Explorer Shell Extension A particularly useful ARJ support utility is SARJ by Frederic Taes. It improves upon ARJ compression by using ARJ to build "solid" archives. Windows interface recommendation: The author of ARJ personally uses Total Commander for his Windows work with ARJ currently. Total Commander is especially useful because it supports many popular archivers and is designed as a file management tool. It treats archives like directories. This is especially handy for ARJ users who archive whole directory trees. And since it is a file manager, one can delete, move, copy, view, edit, and modify files in archives and not in archives. It even has FTP file transfer support. You can find Total Commander at http://www.ghisler.com USING ARJ AS A BACKUP PROGRAM: ARJ can be used as a substitute for a backup program. Now ARJ includes an error recovery option (-hk) to help protect against many kinds of data errors. Please note this option must be applied before data errors occur. It is STRONGLY recommended that you use the "-hk" option when archiving important files and when archiving to diskettes. The most common cause of failure is bad diskettes. You should let ARJ test the archives ON the diskettes. Testing the archives before copying them to diskettes is not enough. Critical data should always be backed up two or more times. Please keep in mind that damage to compressed data is many times more serious than damage to uncompressed data. WARNING: It is our recommendation that you should NOT update multiple volume ARJ archives of critical data especially backup archives. A system error could cause the current set of volumes being updated to be damaged. Use a separate set of diskettes to do an incremental backup. The following partial command lines illustrate a full backup command, an incremental backup command, and a restore command. The only parts missing are the names of the files to backup/restore. ARJ a A:backup -r -vvas -a1 -b2 -hk -js -jt -jiC:\backup.inx -wC:\ -m3 ARJ a A:backup -r -vvas -a1 -b1 -hk -js -jt -jiC:\backup.inx -wC:\ -m3 ARJ x A:backup -vv -y You should familiarize yourself with the above switches so that you can modify the above command lines as needed. If you have a RAMDRIVE large enough, you should change the "-w" option to point to the RAMDRIVE. If you have enough free hard disk space, you can build all of the diskette volumes on the hard disk for future transfer to diskette. In this case, you will need to change the name of the archive to "C:backup" or similar. The "-vvas" option should be changed to "-v360", "-v720" or whatever is appropriate for your diskette size. Please note that 360, 720, 1200, and 1440 are abbreviations for the standard diskette sizes. Other sizes will require your entering the entire number. Another change is to add the option "-y" which will turn off the "Ok to proceed ...." prompt. Lastly, if the "-w" option is pointing to the hard disk, you should remove the "-w" option entirely. ARJ a C:backup -r -v360 -m3 -y At this release, ARJ will automatically roll-over the file extension from .A99 to .100 and so on. Both backup commands will pause for a "system command". You can execute DOS commands at this point. This is a suitable place to do a "dir a:" to make sure that your disk is formatted and has enough free space on it. You may need to execute "format a:" or "del a:\". A very useful command might be "QDR A:". QDR is a utility from Vernon Buerg. You will need to type "exit" to allow ARJ to continue. If the backup fails after completing one or more diskettes, you can restart at the next archive after the last successful volume if you have specified an INDEX file with the "-ji" option during the backup. You can restart by retyping the EXACT SAME command line as before and adding the "-jn" option. This will cause ARJ to scan the previously written index file for the proper restart information. ARJ will automatically set the correct volume name. Example: ARJ a a:backup c:\ -r -vvas -jiINDEX.FIL ARJ a a:backup c:\ -r -vvas -jiINDEX.FIL -jn If a RESTORE operation fails after one or more diskettes, simply retype the same command as before but add the right ".Ann" suffix to the archive name. If ARJ has aborted because of a disk full on a file split between volumes, you will have to restart at the first volume that contains that file. BACKUP TYPE ARCHIVES AND BACKUP FILES: This type of archive is obsolete after ARJ version 2.50a. It is replaced by the chapter archive. CHAPTER ARCHIVES: This feature is useful when backing up frequently modified files. This new feature is designed to make the backup management of a directory or application easier. It allows the taking of a sequence of backup "snapshots" of a changing application or directory. A chapter archive can provide major space savings over using many separate archives for backup. For example, a chapter archive could be used to keep track of the state of a Windows 3.1 directory. An initial chapter backup could be made of the original Windows 3.1 installation. Then, whenever a new software package is installed, a new chapter snapshot could be taken. ARJ ac winback c:\windows\*.* -r -a1 -jt1 If a Windows problem develops, one can restore Windows back to any particular chapter for testing. ARJ x winback c:\ -y -jb5 restore chapter 5 This chapter feature is especially useful for software developers. Since a chapter archive can contain up to 250 chapters, the change history of a software source directory for a period of weeks can be maintained in a single archive. You could take four chapter snapshots per day for over two months to a single archive. This would allow you to restore your source directory to one or more points in time to help you track the appearance of software problems. See the "-jb" option for more details. The limitation on the maximum number of chapters is an internal resource issue as well as a "recommendation" to build a new archive. Making thousands of modifications to important backup data is a somewhat risky activity. Please note that deleting files or purging old chapters from a multiple volume archive is not recommended. With a multiple volume archive, deletions do not save space, so deletions are not useful. WINDOWS 9x LONG FILENAME SUPPORT: This version of ARJ supports the use of long filenames under the Windows 9x GUI in the MS-DOS Prompt environment. It does not support long filenames under MS-DOS 6.22 and below or in Windows NT/2000. It supports long filenames ONLY when the Windows 9x GUI (graphical user interface) is running. In other words, there is no long filename support in Windows 9x MS-DOS mode (accessed from the Win9x shutdown menu). Moreover, there is NO long filename support in ARJ for Windows NT/2000. Windows 9x DOS support (and therefore ARJ) do not support access to long filenames containing certain characters. For example, a filename containing the copyright symbol or the trademark symbol cannot be accessed in a Win9x DOS window with the COPY command or with ARJ. These type of filenames can only be accessed via their short names. The Win9x system normally stores filename characters as two bytes per symbol allowing an alphabet of 65536 possible symbols. Because Win9x DOS only uses one byte per character position allowing only a 256 symbol alphabet, many characters are displayed by Win9x DOS as "_". In addition, ARJ does not support files over 2 GB in size. The small ARJ self-extractor (-je1) does NOT support the handling of long filenames. The ARJSFX and ARJSFXV modules (-je) support long filename handling. However, they will only extract archived Win9x long filename files under Win9x. If long filename files are being extracted to plain DOS, an error message will be displayed. They can be forced to extract the Win9x archived files with the "-j" option. For compatibility with MS-DOS and older versions of ARJ, ARJ can create a dual-name compatibility ARJ archive. This is an archive with both shortnames and longnames stored in it. The longnames are stored in the file comment field. New versions of ARJ will treat the dual-name archive according to the operating system environment. In other words, under MS-DOS, a dual-name archive will look like a shortname archive. Under Win9x, a dual-name archive will look like a longname archive. This is also true of the ARJSFX and ARJSFXV/32 modules (-je). For efficiency reasons ARJ does not repeatedly check for file system support of long filenames. ARJ only tests the "C:" file system. An error may occur if ARJ under Win9x tries to access a disk drive that does not support long filename handling. The "-hf" option can be used to force ARJ to use the standard 8.3 filename APIs instead of the longname APIs. On a more technical note, ARJ detects long filename support by two tests. The first is that the OS is 7.0 or higher. The second is via the "Get volume information" api. There are five new options "-hf", "-hf1", "-hf2", "-hf3", and "-hf4" that provide choices in the handling of long filenames. See the discussion of those options below for more information. ARJ will save Win9x long filenames in the letter case they are stored on disk; however, all filename matching is done without regard to case. In other words, "ThisName.Ext" matches "thisNAME.ext". When archiving files under Windows 9x, be sure to EXCLUDE files from processing that are OPEN such as WIN386.SWP. REMINDER: When specifying filenames with embedded blanks or symbols like ">", "<", or "|" on the command line, you MUST quote the filenames. Examples: ARJ a archive "C:\Program Files\*.*" -r ARJ c archive "<<<*" -jz -jb When specifying a target directory name that contains spaces, you must quote the directory name. If the name specification ends in a "\" backslash (needed for a non-existent directory), you must insert a space after the "\". Alternatively, you can use the "-ht" option. The built-in C run-time library uses the "\" as a character escape symbol. Example: ARJ x archive "C:\Program Files\ " or ARJ x archive "-htC:\Program Files" For Windows 9x disaster recovery, we make use of the program DOSLFNBK.EXE 2.3 by D. J. Murdoch. With this program while in plain DOS, you can save all of the long filenames to BACKUP.LFN. Then you can use ARJ or any other DOS backup scheme to backup your system including the BACKUP.LFN. CAUTION: Please check the version of DOSLFNBK you are using. Some versions do not support FAT32 partitions. Here is a brief list of steps to backup and restore: 1) Make a Win9x startup diskette. 2) Shutdown to MS DOS mode. 3) While you are on the C: drive, execute "DOSLFNBK C:\". Change to the D: drive (if any) and execute "DOSLFNBK D:\". Execute DOSLFNBK for each drive on each drive. 4) Use ARJ or other DOS backup program to backup ALL of the files. Example: ARJ a A:backup C:\*.* D:\*.* -r -a1 -jt1 -va -jf CAUTION: For important backups, we always make TWO BACKUPS of our system. All too often, one or more files will not restore correctly because of some data error (MURPHY'S LAW in action). 5) Save ARJ.EXE or your backup program to diskettes in a restorable form. 6) Backup finished. 1) Boot from your Win9x startup diskette. 2) Execute "SYS C:" from the A: drive to re-install the boot. 3) Install ARJ.EXE or your backup program on the hard drive. 4) Restore all of the files. Example: ARJ x A:backup -v -jf -y -ha 5) On each drive, execute "DOSLFNBK /r" to restore the long filenames. 6) Restore finished. WINDOWS NT AND 2000 SUPPORT ARJ will run in a command prompt window in NT and 2000. Please note that ARJ does not support long filenames in Windows NT or Windows 2000. However, there is a option "-h$" that forces ARJ to use long filenames in Windows 2000. ARJ uses an undocumented feature of Windows 2000 to do this. ARJ32 fully supports long filename use in Windows NT and Windows 2000. In addition, ARJ32 supports restoration of directory date-time stamps only in Windows NT and 2000. Windows 9x/Me do not provide support for this type of directory access. UNIVERSAL NAMING CONVENTION (UNC) ARJ supports archiving filenames using UNC paths. By default, ARJ will remove the leading "\\" symbols to allow ARJ to treat the pathname as a relative pathname. The use of the "-jf" option will set ARJ to keep the "\\" symbols. The "-jf1" will remove the leading "\\" symbols. UNC pathnames stripped of the "\\" can be restored to their network paths with "ARJ x archive \\". ARJ VOLUME NAMING OPTIONS By default, ARJ has been naming subsequent volumes in a multiple volume archive by using a numeric file extension (archive.ARJ, archive.A01, archive.A02, and so on). Because the file extension changes, this naming scheme may not be appropriate in an Internet environment. Some browsers will not properly download an ARJ archive with the normal LEFT mouse click. Most browsers will properly download an EXE file with a LEFT mouse click. New to ARJ 2.71 and ARJ32 3.04 is an OPTIONAL naming scheme that maintains the initial file extension (EXE or ARJ) and numbers the filenames. This option is set with the "e" option for "-v". Examples: ARJ a archive -ve1440 => archive.ARJ, arch001.ARJ, arch002.ARJ, .... ARJ a archive -je -ve1440 => archive.EXE, arch001.EXE, arch003.EXE, .... ARJ a name001 -je -ve1440 => name001.EXE, name002.EXE, name003.EXE, .... If the base archive name ends with a number, ARJ will use that number as the base volume number. When building a multiple volume self-extractor using the "-ve" option, ARJ will put the self-extractor ONLY in the first volume. Subsequent EXE volumes include an EXE stub that displays a usage message. Versions of ARJ before 2.71 and ARJ32 before 3.04 will not be able to process this alternately named multiple volume archive. ARJ-PROTECT DATA PROTECTION FEATURE: With this version, ARJ can repair "protected" archives that suffer from slight amounts of data damage (CRC error, bad header, etc). An ARJ archive is "protected" with the "-hk" option. With the "-hk" option, ARJ will generate ARJ damage protection data. This data is appended to the protected archive. This data is REQUIRED in order to repair damaged ARJ archives. The size of this data ranges from a minimum of 4K bytes and larger. For larger archives, the protection data size is typically less than one percent of the archive file size. Before this release, the ARJ-PROTECT data was saved in a separate .XRJ file. At this release, ARJ sets an AUTO ARJ-PROTECT flag within a protected archive (except for ARJ-SECURED archives), so that future updates to the archive will include ARJ-PROTECTION. "ARJ y archive -hk" can be used to clear that flag. This protection feature is sector based and allows repair due to typical types of disk corruption (bad sector, virus damage, cross links, etc). This type of sector protection is NOT effective for most data transmission problems where data is missing from the middle of a transmission. It is STRONGLY recommended that ARJ-PROTECT be used on archives of important data and on archives on diskettes. The majority of reports of archive damage is due to diskette errors. Technically, this protection feature uses a series of XOR sums and checksums in order to allow repairs. Larger archives are logically treated as several streams of data. ARJ can protect each "stream" from one or two damaged sections 1024 bytes in size. However, for large archives (1 MB or larger) ARJ can sometimes repair up to four damaged sections per MByte. The "-hk1, "-hk2" .... "-hk20" options can offer more data protection at the cost of a proportionately larger protection data. The "-hk" option sets ARJ to build a protected archive. The "q" command is used to repair a damaged archive. The repaired archive is named ARJFIXED.ARJ. The original damaged archive is not modified. Example: ARJ a archive -hk ARJ-PROTECTED ARJ q archive repairs archive.ARJ If ARJ detects slightly damaged ARJ-PROTECT recovery data, it will display a warning. The archive should be re-protected Example: ARJ y archive -hk remove ARJ-PROTECT ARJ t archive -hk restore ARJ-PROTECT ARJ ANSI COMMENT HANDLING: As of version 2.55, ARJ will use its own ANSI sequence display handler to display ARJ comments. In previous versions, ARJ depended upon the "-ja" option and an installed ANSI.SYS driver to handle the ANSI escape sequences. The "-ja" option has a new function now. The "-ja" option will set the "P" command to display files using the new ANSI sequence display handler. The ARJSFXV module (-je -v) also will display ANSI comments now. Please note that the ARJ comment field size is limited to about 2K bytes. THE FILESPEC "...": Several times in this document and the UPDATE.TXT file, there is mention of the filespec "..." (not to be confused with my use of "...." in this document to mean "and so on"). This filespec is chosen so as not to match any existing filename. ARJ will NOT generate an error or warning for not matching "..." specifically. This is a problem when using ARJ on a NOVELL network as the filespec "..." is a valid directory name. A partial workaround is to specify a non-existent filespec such as "@@@" in place of "...". Or you may use the "-hn" option to specify a name that is not to match any filename. ARJ ERROR SITUATIONS: ADD: If a user specified file is not found during an add, ARJ will continue processing, and will keep the archive and terminate with an error condition. Note that files specified within an ARJ listfile that are not found during an add will NOT trigger an error unless the "-hl" option is also specified. In a disk full condition or any other file i/o error, ARJ will promptly terminate with an error condition and delete the temporary archive file unless the user has specified the "-jk" switch. MOVE: ARJ will only delete files that have been successfully added to the archive. If you have specified the "-jt" (test) switch, ARJ will abort on any error. If you specify the "-jk" switch, ARJ will keep the temporary archive upon an abort. EXTRACT: In a disk full condition or any other file i/o error, ARJ will promptly terminate with an error condition and delete the current output file. However, when extracting a file split over multiple volumes, ARJ will attempt to save the file. If ARJ is restarted at the failed volume, ARJ will extract the split file to the proper position in the saved file. CRC ERRORS OR BAD FILE DATA: In the case where an ARJ archive has been corrupted, ARJ will report a CRC error or a Bad file data error. These corruptions can be the result of an unreliable diskette, a computer memory problem, a file transfer glitch, or incompatible CACHING software. Most of these errors are the result of file transfer glitches and bad diskettes. A few are the result of an incompatible interaction with SUPER PCKWIK 3.3 advanced diskette support or Windows 3.x. Individual files in an archive that are affected by the CRC or Bad file data errors CANNOT be recovered in an undamaged state. Other files in a damaged archive can be recovered by extracting them using the "-jr" option. However, with some preventative action as in the use of the "-hk" option to generate a data damage protected archive, slightly corrupted ARJ archives can be fully repaired and all damaged files recovered in an undamaged state. CRITICAL ERROR HANDLER: ARJ sets up an interactive critical error handler to handle DOS critical errors like "sector not found" and "drive not ready". When a critical error occurs, ARJ will prompt the user with the message "Retry Y/N?". The user may retry the failed operation by pressing "Y". Pressing "N" will fail the operation or abort to DOS depending upon the version of DOS. The user can press Control BREAK to abort to DOS. ARJ DOS ERRORLEVELS: ARJ returns a number of DOS errorlevels for different situations. 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) 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 in archive Please note that DOS batchfiles have a unique method of testing for a DOS errorlevel. The batch statement IF ERRORLEVEL 0 .... means if the errorlevel is EQUAL TO or GREATER THAN 0. Generally, one should test for the highest possible errorlevels first and proceed lower as in: ARJ a archive *.* if errorlevel 9 goto not_arj if errorlevel 8 goto no_memory . . . if errorlevel 1 goto minor_error type ARJ command successful ARJ USER ACTION PROMPTS: ARJ prompts the user for action at certain times. There are several types of prompts. One is for yes/no permission, another is for a new filename, another is for archive comments, and one other is for search strings. The ARJ yes/no user prompts provide a lot of flexibility. In addition to the normal yes and no responses, ARJ also accepts the following responses: quit, always, skip, global, and command. "Global" sets ARJ to inhibit all subsequent user prompts by assuming YES for all queries as if "-y" were specified. "Always" sets ARJ to assume YES for subsequent queries of the same class. For example, answering ALWAYS to the overwrite query will assume YES for ALL subsequent overwrite queries. "Skip" sets ARJ to assume NO for ALL subsequent queries of the same class. After "always" or "skip" responses, subsequent user prompt messages will still be output to the screen but no user response will be accepted. "Command" prompts for one DOS command and then executes it. ARJ then returns to expect an answer to the current yes/no query. You should keep the query in mind as ARJ does NOT always redisplay the full query message. Since ARJ uses STDIN for user input, be careful about typing ahead anticipating prompts. ARJ may prompt you for an unexpected action and use your earlier input. The "-jyy" option lets you change the prompting modes to single character query mode. See the section on "-jy" for more information. ARJ ENVIRONMENT VARIABLE/CONFIGURATION FILE: ARJ will first look for an environment variable named ARJ_SW and use its value as switch options for ARJ. If ARJ finds such an environment variable, it will display a message to that effect. You can inhibit ARJ from using this environment variable by using the "-+" option. You can also set the name of the environment variable with the "-+" option as in ARJ a -+ARJ_SW2 archive. SET ARJ_SW= Example: SET ARJ_SW=-w\temp -k -e Do NOT add any blanks after the variable name ARJ_SW. As in LHARC, command line switches can be selected to override ARJ_SW settings. ARJ32 uses ARJ32_SW as its default variable. ARJ will allow you to use a different switch character "-" or "/" in ARJ_SW and in the command line except when using the "-ju" (unix) option. If the ARJ_SW environment variable specifies a filename (text not beginning with a switch character), ARJ will open that filename and scan it looking for a line of text that begins in column 1 with the same letter as the ARJ command being executed. The following text is processed as the ARJ_SW switches. This allows each ARJ command to have its own switch settings. In addition, ARJ will also look for the "+" (plus) symbol in column 1 to use as a miscellaneous switch string. This string will be added to any command switch string found if any. If no command switch string is found, ARJ will use the miscellaneous switch string as the ARJ_SW switch settings. NOTE that the "+" switch settings will NOT be used if the "+" string occurs below the command switch string. New at ARJ 2.73 and ARJ32 3.06 is the "-" (minus) symbol in column 1 to use as a miscellaneous switch string. It works similar to the "+" symbol EXCEPT that the following switch string is prepended to any subsequent command switch string. The "+" symbol causes its switch string to be appended. This affects switch processing. SET ARJ_SW=C:\ARJ\ARJ.CFG C:\ARJ\ARJ.CFG contains: a -jm1 -jt -i1 c -zcomment.txt + -jv l -jp e -i1 AND is equivalent to: a -jm1 -jt -i1 c -zcomment.txt l -jp -jv e -i1 -jv f -jv v -jv all other commands use -jv In the above example, any ARJ "a" commands will use "-jm1 -jt -i1" as the ARJ_SW switch options. C:\ARJ\ARJ.CFG contains: a -jm1 -jt -i1 - -i l -jp e -i- AND is equivalent to: a -jm1 -jt -i1 l -jp -i e -i -i- all other commands use -i In the above example, the "e" command switch is chosen to cancel the general "-i" option. This feature would not work using the "+" symbol instead of the "-" symbol. The "-" symbol is likely more useful than using the "+" symbol. The ARJ_SW variable or the ARJ_SW configuration file switch settings may NOT have quoted switches such as "-vasformat a:". As of this release, ARJ will also accept the commands "ac", "cc", "dc", "lc", and "vc" in the ARJ configuration file. SET ARJ_SW=C:\ARJ\ARJ.CFG C:\ARJ\ARJ.CFG contains: a -jm1 -jt -i1 ac -jm -jt dc -jt ARJ COMMAND LINE SYNTAX: ARJ [-[-|+|