CSWEEP -- A command-line file management program: ==================================================== Lindsay Haisley 2406 B Winstead La. Austin, TX 78703 DESCRIPTION: ============ CSWEEP is a file copy program similar in function to the popular SWEEP and NEWSWEEP programs. Unlike these programs, CSWEEP operates entirely from command line options and has no interactive mode. In this respect it is similar to Digital Research's PIP program. CSWEEP however, offers the following options not available with PIP. ** Multiple copies on different drive/user areas with a single operation. ** ZCPR3 style drive/user access. Source and destination files may be on any drive (A thru P) or user area (0 thru 31). ** Source file may be deleted after copying (-d option) ** True CRC file copy checking (-v option) CSWEEP is extremely useful for copying or moving files with any program or operating system that uses command files, such as SUBMIT. It will also save many keystrokes over SWEEP or NEWSWEEP when moving large numbers of files around in your disk system. USAGE: ====== The command line format for CSWEEP is: CSWEEP f1 [f2 .. fn] sdu: ddu1: [ddu2: ... ddu6:] [-v] [-d] Optional command arguments are in square brackets. The arguments are: f1 .. fn -- file names to copy (may be ambiguous) sdu: -- source disk/user (e.g. a0:) ddu1: .. ddu6: -- destination disk/user -v -- verify copies (CRC) -d -- delete source copies All drive/user designations are in the form of a drive letter followed by an OPTIONAL user area number followed by a colon, as in the example above. Any other format will be flagged as an error. The current user area is assumed if none is given. Filenames, drive/user specs and options may be given in any order with the exception that the first valid drive/user spec encountered will be interpreted by CSWEEP as the source d/u for copying. AMBIGUOUS FILE NAMES: ===================== CSWEEP accepts ambiguous file names of the standard CP/M sort with one addition. An ambiguous file name (afn) preceded by a "!" causes all names matching the given afn to be EXCLUDED from the resulting copy. Thus, to copy all files except "COM" files from a: to b:, say: CSWEEP *.* !*.com a: b: When giving a "!" afn, "*" chars in the string match to the end of either the filename or extension, just like CP/M, but "?" chars match ONE and ONLY ONE character in either the filename or extension. OPTIONS: ======== CSWEEP accepts two command options which must be preceded by a "-" sign. -D Delete the source file after all copies have been made. If a write error of any sort occurs during a file copy, the source file will NOT be deleted. -V Verify each copy with a CRC (Cyclic Redundancy) check. This option will slow down the operation of CSWEEP considerably since each copy file must be read back and verified against the CRC of the source. OPERATION: ========== CSWEEP will copy all files as instructed unless a BDOS file error is encountered in the copy process. If an error occurs in creating or writing to a copy file, CSWEEP will report the error, delete the partial copy (if any) and drop the disk/user in which the error occurred from further copy operations. After completing it's work, CSWEEP will report a tally of files copied and errors encountered. If your CP/M system memory is exceptionally small (less than 48K) you may receive an "Out of Memory" error when you attempt to run CSWEEP. If your operating system is of the type which takes proprietary control of portions of high memory (such as ZCPR3) CSWEEP may crash or simply lock up. If this happens, you may use any convenient debugger or disk utility to change the byte at address 16B8 hex (157D hex if referenced to 0 rather than 100 hex). This byte follows the word "MEMORY" in memory and determines the number of 128 byte sectors read into memory at one time. A small value here will assure the safety of your operating system, but will cause the program to run quite slowly. The default in the program as distributed is 180 sectors, or about 22K. Thus CSWEEP requires a total of c.a. 38K bytes to operate. This should not present a problem to most operating systems. * * * * * * * * * * * * * * * * * * * * * * Many thanks and much credit to Leor Zolman of BDS Software for the C routines which make up the main body of the code for CSWEEP, and also for the documentation for the wildexp function which is paraphrased in the "Ambiguous File Names" section above.