******* ExtractorPC 1.00 ******* ExtractorPC is a free utility for expanding the files in archives created by Compact Pro(tm). Note: ExtractorPC is copyrighted 1991 by Bill Goodman. The self-extracting code used to distribute this package was produced by LHA which is copyrighted 1988-91 by Haruyasu Yoshizaki. Requirements ExtractorPC works with IBM PCs and compatible machines (there are no known incompatibilities). It requires MS-DOS 2.10 or higher. About Compact Pro Archives A Compact Pro (CP) archive may contain the data for one or more Macintosh files and folders in compressed format (a folder is the Macintosh equivalent of a directory). It also contains information about the hierarchical structure of the folders within the archive. This information can be used to reconstruct an equivalent "tree" of directories from the archive. Note that the names of files and folders within an archive are not necessarily unique, i.e., there can be two files named "FOO" within the same folder. Typically, an archive is stored as a single file; however, CP archives may be divided into "segments". A typical use for segmented archives is to divide a large archive into pieces that are small enough to fit on floppy disks. About Macintosh Files Standard Macintosh files have two "forks" - a data fork and a resource fork. Each of these forks contains a separate block of data which roughly corresponds to a file on a PC. You can think of a Macintosh file as being two PC-style files which are linked together with a common name. In general, the data which Macintosh applications store in resource forks is not very useful to non-Macintosh applications. For this reason, ExtractorPC only extracts the data forks of Macintosh files by default. An option is provided to extract the resource forks for situations where the data in the resource fork is required. When a CP archive is originally created on a Macintosh, it has both a resource fork and a data fork. When it is transferred to a PC, there are two common ways of converting the file to PC format. Some programs will convert the file to "MacBinary" format; this preserves the data in both the resource and data forks. Other programs will discard the resource fork and simply copy the data fork to a PC-style file. Since the resource fork does not contain any data needed to extract the contents of the archive, either of these formats is acceptable to ExtractorPC. Installing ExtractorPC No special installation of ExtractorPC is required. You may place a copy in your current working directory or any other directory which is referenced by MS-DOS's search path. Using ExtractorPC ExtractorPC is a non-interactive, batch-style program. It is started from the DOS command line by entering "EXTRACT" followed by the name of the CP archive to be processed (for segmented CP archives, the names of all segment files must be specified in order). ExtractorPC will extract the data forks of all the files in the archive and store them hierarchically in the current working directory. If no errors are detected, ExtractorPC returns an exit code of 0 (this value may be tested in batch files). If any error is detected, ExtractorPC terminates and returns an exit code of 1. ExtractorPC's standard operation may be modified by specifying various "options" on the command line. These options are described in the following section. Command Line Summary A> EXTRACT ArcName1 <-b> <-dDIRPATH> <-eFNAME> <-f> <-l> <-o> <-r> <-s> <-u> <-v> Items enclosed in "<>" are optional. ArcName1 This is the name of the first segment of the archive to be processed. ArcName2, ArcName3, ... These are the names of the segment files for a segmented archive. ArcName2 must be the second segment of the archive and ArcName3 must be the third segment, etc. -b (binary) Normally, ExtractorPC will translate extracted text files by adding a linefeed character after every carriage return character. If the "-b" option is specified, no text file translation is performed. -dDIRPATH (directory) By default, the extracted files are stored hierarchically in the current working directory. The "-d" option may be used to specify a different destination directory. DIRPATH is the path to the desired directory. It may be specified relative to the current working directory ("FOO\SAMPLE") or it may be specified as an absolute path ("C:\APPS\EXAMPLE\FUNCTIONS"). The directory must already exist - ExtractorPC will not create it. -eFNAME (extract) By default, ExtractorPC extracts all files in an archive. The "-e" option may be used to specify one or more individual files or folders to be extracted. If the file/folder name contains blank characters, it must be enclosed in quotation marks, e.g. -e"A Long File Name". Either upper or lower case characters may be used to specify the name. If the named file or folder exists in more than one directory, only the first one found will be extracted. -f (flat extract) The "-f" option suppresses the creation of the folder hierarchy stored in the archive. All files will be stored in the destination directory and no folders will be created. -l (list catalog) If the "-l" option is specified, ExtractorPC displays a list of the files in the archive, but no files are extracted. For segmented archives, it is not necessary to list all the segment files if the "-l" option is used - only the last segment must be entered on the command line. -o (overwrite) Normally, ExtractorPC will not overwrite any existing files when it is extracting files from an archive. Selecting the "-o" option instructs ExtractorPC to delete any pre-existing files necessary during extraction. -r (resource forks) Selecting the "-r" option directs ExtractorPC to extract the resource forks of files rather than the data forks. -s (skip errors) If an error is detected during the extraction process, ExtractorPC normally halts. Selecting the "-s" option forces ExtractorPC to skip any files which produce errors and continue with the remaining files. -u (unique names) Since Macintosh filenames can be much longer than PC filenames, ExtractorPC often has to shorten the names of extracted files. Sometimes it will not be able to extract the files in an archive because several of the names end up being the same after they've been shortened. If the "-u" option is selected, ExtractorPC will guarantee that all filenames and folder names are unique by creating names of the form "NAME0000". These names may be correlated back to the Macintosh filenames by reviewing the text which is output to the screen during extraction (note this information may be saved to a file by redirecting the output to a file). -v (validate archive) If the "-v" option is specified, ExtractorPC expands all files and verifies that the archive data is valid. No files are created and no data is written to disk. Example Command Lines To extract all the files in a CP archive named "BIGFILES.CPT" and store them in the current directory, use the following command line: A> EXTRACT BIGFILES.CPT As a second example, suppose you have a segmented archive consisting of the files "BIGARC.#1", "BIGARC.#2", and "BIGARC.#3". You could expand all the files from the archive and save them (ignoring any folder hierarchy) in a directory named "C:\SAVE\GRAPHICS" with the following command line: A> EXTRACT BIGARC.#1 BIGARC.#2 BIGARC.#3 -dC:\SAVE\GRAPHICS -f Note that the segment files must be specified in the correct order, but the placement of the options is not important (they may be placed before, after, or interspersed with the segment filenames). To extract the two files named "ReadMe" and "Help Text" from an archive named "BBS.CPT" and store them in the current directory, use the following command line: A> EXTRACT BBS.CPT -eREADME -e"help text" Limitations ExtractorPC has the following limitations: o Archives with more than 800 files and folders cannot be expanded. o Archives with more than 20 segments cannot be expanded. o Encrypted files cannot be expanded. Problem Reports ExtractorPC was written by Bill Goodman. You may report problems or send suggestions to the author by US Mail at: Bill Goodman 109 Davis Avenue Brookline, MA 02146 You may also use the following electronic mail addresses: Compuserve: 71101,204 Internet: 71101.204@compuserve.com GEnie: B.GOODMAN5