CSWEEP -- A command-line file management program: Documentation for Version 2.1 ==================================================== Lindsay Haisley 14206 Spreading Oaks Leander, TX 78641 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) ** Version 2 provides a pre-copy file size and disk freespace check. 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. CSWEEP is as fast or faster than these programs for all types of file copy operations. USAGE: ====== The command line format for CSWEEP2 is: CSWEEP f1 [f2 .. fn] sdu: ddu1: [ddu2: ... ddu6:] [options] Optional command arguments are in square brackets. The arguments are: f(x) -- Ambiguous file names sdu: -- Source disk/user or * for current (e.g. a0:) ddu(x): -- Dest. disk/user or * for current Options: -v Verify (CRC) -d Delete source copies -r Report stats -s Report and copy 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. Note that Vs. 2 will allow the use of the "*" for any d/u spec to designate the current disk drive and user area. 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 four 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. -R For each disk to receive copies, summarize the available space and determine the total size of files to be assigned to that disk. For each disk, the block size, free space, total of files assigned and remaining freespace (after copying) are given. Note that if target disks have different block sizes then the total size of assigned files will vary accordingly. This option will give only the size report. No copying will be done. -S Same as the -R option except that copying will be done automatically following the report unless a disk with insufficient space to receive copies is found, in which case an option to abort the copy is offered. Note that if any of the files to be copied already exist on a target disk then the space report for that disk will be in error. New files will simply overwrite old files of the same name. 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. Version 2 now allocates memory space dynamically at run time so that it is not necessary to set the memory size in the object code as with version 1.1. A serious bug in Vs. 1.1 is fixed in Vs. 2.0. Previously, if the -v option was given on a copy operation to several disks, all copies after the first would be incomplete. This no longer is the case. * * * * * * * * * * * * * * * * * * * * * * 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. Copies of the source code for CSWEEP are available from the author for a nominal fee.