SH Archive Identifier Version 2.10 (c) 1996-1997 SH Software Documentation What? ----- SH Archive Identifier is a small utility, used from the command line to identify various archive formats. It relates in a verbal form which kind of archive it deals with and returns the certain an errorlevel for Dos. Naturally, it recognizes only one archive per run (=wildcards may not be used), and that's why it may fit best for BBS usage. Usage ----- In my own BBS (Reflection) I use this utility to add randomly named advertisiments into an archive, because the upload checker I use does not support this feature. Of course, it can be used, for example, to check viruses inside archivers, etc. Inside this archive there are two batch files to demonstrate the function and flexibility of SH Archive Identifier. First, there is PCBTEST.BAT which may be the base for building BAT files. Secondly, there is ACVT.BTM (4dos batch file) which may be used to convert ZIP, ARJ, LHA, JAR, and RKive files between each other. List of errorlevels and short names ----------------------------------- The list can also be presented, in a brief form, by ARCHID itself. "Call" column means a short name for an archive whereby the type is told to ARCHID if default errorlevels are not desirable to be used - see "Usages". ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Default errorlevel + archive³Call ³ Tested / Information ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 1 - ARJ archive ³arj ³ ARJ 2.20, 2.50a, 2.55b 2 - ZIP archive ³zip ³ PKZIP 2.04g, ZIP 2.0 3 - RAR archive ³rar ³ RAR 1.55, 2.00 beta, 2.00 4 - LHA archive ³lha ³ LHA 2.13, 2.55b 5 - LHarc archive ³lharc³ LHA 2.13 with "old method" 6 - UC2 archive ³uc2 ³ UC r3 pro 7 - GZIP (GNU ZIP) archive ³gzip ³ GNUZIP 2.1.4 8 - ARC archive ³arc ³ ARC 6.02 9 - HA archive ³ha ³ HA 0.999b 10 - Hyper archive ³hyp ³ HYPER 2.5, 2.6 (German) 11 - PAK archive ³pak ³ PAK 2.10 12 - PKPAK archive ³pkpak³ PKPAK 3.61 13 - SQZ archive ³sqz ³ SQZ 1.08.3 14 - ZOO archive ³zoo ³ ZOO 2.1 15 - AIN archive ³ain ³ AIN 2.2 16 - ARX archive ³arx ³ ARX 1.0 17 - BSA archive ³bsa ³ BSA 2.00 18 - ChArc archive ³chz ³ CHARC 1.2 19 - Codec archive ³cdc ³ CODEC 3.10 20 - HAP 3 archive ³hap ³ HAP 3.00, THAP 1.02c 21 - HPack archive ³hpk ³ HPACK 0.79c0 22 - CrossePAC archive ³pac ³ CPAC 1.35 23 - JRchive archive ³jrc ³ JRC 1.10 24 - Limit archive ³lim ³ LIMIT 1.2 25 - MAR archive ³mar ³ MAR 1.0 26 - PUT & GET archive ³put ³ PUT 3.34 27 - SAR archive ³sar ³ SAR 1.00 28 - SqWez archive ³sqw ³ SQWEZ 2.2 29 - Quantum archive ³paq ³ QUANTUM 0.96 beta, 0.97 beta 30 - YAC archive ³yac ³ YAC 1.02 31 - X1 archive ³x1 ³ X1 0.94h beta 32 - AMGC archive ³amg ³ AMGC 2.2 33 - DWC archive ³dwc ³ DWC A5.01 34 - Larc archive ³lrc ³ LARC 3.33 35 - LHark archive ³lhk ³ LHARK 0.3o 36 - FOXSQZ archive ³fox ³ FOXSQZ 1.6i BETA 37 - MDCD archive ³md ³ MDCD 1.0 38 - Quark archive ³ark ³ QUARK 1.0 beta 39 - ACB archive ³acb ³ ACB 1.13b, 1.23b, 1.29b 40 - RKIVE archive ³rkv ³ RKIVE 1.0, 1.1, 1.2, 1.3, 1.4 41 - JAR archive ³jar ³ JAR 1.01 beta_2 42 - Dirks Pack archive ³dpa ³ DPA 1.1a 43 - ESP archive ³esp ³ ESP 1.8 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 101 - ARJ SFX executable ³arj-x³ ARJ 2.20, 2.50a, 2.55b 102 - ZIP SFX executable ³zip-x³ PKZIP 2.04g, InfoZip 5.20 103 - ZIP SFXjr executable ³zjr-x³ PKZIP 2.04g 104 - RAR SFX executable ³rar-x³ RAR 1.55, 2.00 beta, 2.00 105 - LHA SFX executable ³lha-x³ LHA 2.13 106 - LHarc SFX executable ³lhc-x³ (tested) 107 - ARX SFX executable ³arx-x³ ARX 1.00, both COM and EXE 108 - BSA SFX executable ³bsa-x³ BSA 2.00 109 - ChArc SFX executable ³chz-x³ CHARC 1.2 110 - SqWez SFX executable ³sqw-x³ SQWEZ 2.2 111 - SQZ SFX executable ³sqz-x³ SQZ 1.08.3 112 - SQZ SFXjr executable ³sqj-x³ SQZ 1.08.3 113 - PAK SFX executable ³pak-x³ PAK 2.51 114 - LARC SFX executable ³lrc-x³ LARC 3.33, both COM and EXE 115 - LHark SFX executable ³lhk-x³ LHARK 0.3o 116 - ESP SFX executable ³esp-x³ ESP 1.8 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 249 - Invalid shortname ³ ³ Packer's callname, given in ³ ³ parameters above 2, is not ³ ³ recognized. See "ways to use". 250 - Insufficient memory ³ ³ There is not enough memory for ³ ³ necessary buffer, so memory is 70 kB ³ ³ less. 251 - File close error ³ ³ Should never happen 1-user systems. ³ ³ File was deleted from a network? 252 - File read error ³ ³ Probably too small a file (not a real ³ ³ archive or a corrupted one). File 253 - File not found ³ ³ given as a parameter does not exist. 254 - Help screen ³ ³ Appears when no parameters are given. 255 - Not recognized ³ ³ File is neither an archive file nor ³ ³ supported by this version. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Ways to use ----------- ARCHID without parameters shows the short help: usage, list of errorlevels, shortnames in 5 letters, and archive types. Screen automatically pauses if lines exceed the screen or pages are not redirected anywhere else (e.g. file, printer). ARCHID performs file identification: tells the type of an archive and returns an errorlevel to DOS (listed above). For example: C:\>archid test.arj C:\TEST.ARJ - Recognized as ARJ archive (1). C:\>archid test.exe C:\TEST.EXE - Recognized as ARJ SFX executable (101). ARCHID [type..] As far as the is concerned, you should use the 5-letter "call name" of the packer. This usage corresponds with the usage of TESTFILE. For example: C:\>archid test.arj zip rar lha arj C:\TEST.ARJ - Recognized as ARJ archive (4). In other words, errorlevel is the one which corresponds with the position of the type in the list. C:\>archid test.exe zip rar lha arj C:\TEST.EXE - Recognized as ZIP SFX executable (255). However, by this usage, ARCHID always returns 255 (=not recognized), even though it might identify the archive in question, but the type is not listed in the parameters. Contacts with the author ------------------------ You can send me feedback, bug reports, necessary additions, and other questions by the following email: "eerheino@lkol.lpt.fi". Reflection PCB will open again in Finland's area 03 during March 1997. I do not know the number yet but if you read this after March 1997 you can refer Finnish BBS lists to obtain the number. Known problems -------------- Archives created by PKPAK and PAK are often recognized as ARC archives, if the first file in the archive is compressed by an ARC compatible method. As far as I know, it will not be easy to get all of this work, except by going through all files in the archive, but that would slow down the algorithms quite much. For the extraction and other handling of those archives I only recommend the use of PAK, because it supports archives created by both ARC and PKPAK. This version cannot identify any other SFX files but those created by archivers themselves; for example, an archive created by ARJX's MAKESFX is not recognized. Possibly incoming ----------------- - Enhanced identifying routines - Speed-ups (optimizations) to code - Separate, natural OS/2 executable - TAR, LEO, and other new or relevant archivers (if you have information about those archivers, please send me email!) Obtaining the latest version ---------------------------- As everybody knows, no program is complete. I am continuously updating this program: fixing bugs, adding formats, and optimizing code. You can obtain the latest version of SH Archive Identifier via Internet: "http://ameba.lpt.fi/~eerheino/shs/shaid.htm". If you are not in Internet, it may also be obtained from Reflection PCB by logging in as "Support Download". About Reflection, refer to section "Contacting the author". Copyrights ---------- Other products mentioned in this document or the actual program: ACB, Associative Coder (c) George Buyanovsky AIN (c) Transas Marine (UK) Ltd AMGC (c) Milen Georgiev ARC (c) SEA (System Enhancement Associates) ARCID, Archive Identifier (c) Stacy Smith Archive Comparison Test(c) Jeff Gilchrist ARI (c) RAO Inc ARJ, ARJSFX, JAR (c) ARJ Software, Robert K Jung ARJX (c) ROSE, Ralph Roth ARX (c) Michael A. Kosior BSA (c) PTS Ltd ChArc (I cannot read, probably Japanese) Codec (c) Telvox Teleinformatica CrossePAC (c) Digital Strategies Dirks Packer, DPA (c) Dirk Paehl DWC (c) Dean W. Cooper ESP (c) GyikSoft File Format List (c) Max Maischein FOXSQZ (c) Master Creative Software, Inc. GZIP, GNU ZIP Part of the UN*X GNU project HA (c) Harri Hirvola HAP (c) Harald Feldman HPack (c) Peter Gutmann Hyper (c) P Sawatzki & K P Nischke Info-Zip, ZIP (c) Mark Adler, Richard B. Wales, Jean-loup Gailly, Kai Uwe Rommel JRchive, JRC (c) Jayar Systems Larc (c) K. Miki, H. Okumura, K. Masuyama LHA, LHarc, LHA SFX (c) Haruasy Yoshizaki LHark (c) Kerwin F. Medina Limit (c) J Y Lim MAR (c) Haruhiko Okumura, Richard Schiller MDCD (Public Domain) Mike Davenport OS/2 (R) IBM (International Business Machines) PAK (c) NoGate Consulting PKZIP (R), PKSFX, PKSFXjr, PKPAK (c) PKWare Inc PUT & GET (c) Microfox Company Quantum, PAQ (c) CinemaTronics Quark (c) Kunz Robert RAR (c) Eugene Roshal RKive (c) Malcolm Taylor SAR (c) Streamline Design SH Archive Identier (c) SH Software, Eero T Heinonen SqWez (c) JM Software SQZ (c) J I Hammarberg TAR (c) Tim V. Shaporev UC II (c) Ad Infinitum Programs X1 (c) Stig Valentini YAC (c) Aleksandras Surna ZOO, ZOO SFX (c) Rahul Dhesi Thanks to --------- Many thanks to Timo Muhonen and Jari Arkoma, the testers of this version, as well as Heimo Heinonen, the proof-reader of the English version of the document. I am also grateful to the maker of the Archive Comparison Test, Jeff Gilchrist, and to those WWW and FTP servers I used to download the programs. Version history --------------- 2.10 (10 February 1997) - The following formats have been added: ACB, RKive, JAR, ESP (+SFX), DPA - Strenghtened recognition of PKZIP - Added some more errorchecks - A little bit faster - Fixed: did not recognize big DWC archives - Fixed: crashed on smaller executables than 30KB - Removed "new" ARJ SFX specification (unnecessary) 2.00 (05 November 1996) - In addition to normal usage (default errorlevels, 1 parameter) the program can now be used like TESTFILE or Stacy Smith's ARCID: "archid %1 arj zip lha rar .." - The following formats (and possible SFXs) have been added: AIN, AMGC, ARX, BSA, ChArc, Codec3, CrossePAC, DWC, FOXSQZ, HAP3, Hpack, JRchive, Larc, LHark, Limit, Mar, MDCD, Quantum, Quark, SqWez, YAC, X1 - All old & new formats have now been tested! - Re-numbered errorlevels, normal archives correspond with the value of 100 and below - According to File Format List 1.50, an added a support for: - Newer ARJ SFX's - Older LHA SFX versions (<2.13): LHarc 1.xx, LHA 2.10 - Fixed identifying routine for the following archive types: LHA, ZOO, GZIP - Enhanced PKSFX identifying (also InfoZip) - Differentiates between LHA, LHarc and SFX's of them - Differentiates between LHarc and ARX file types - Differentiates between LHA and LHark file types - Differentiates between PKPAK and ARC files (special method) - Fixed a bug in ARC/PAK files: some PAK files were identified as ARC files. - Optimized the old part of the source code - Additional errorlevels 249 and 250 - Enhanced help page: it's a 2-column list with clear topics, a screen pause and a monitor of redirection. Formerly it was a single column non-stopping list. - Shows the errorlevels (also error codes) in brackets. - Shows messages "open error", "close error" 1.00 (30 June 1996) - First public version 1.00 - Some old and uncommon formats have been added (NOT TESTED): ARC, GZIP, HA, HYP, PAK, SQZ, ZOO - Assured LHA identification