FILUPDAT.DOC 1 Revised: 12-22-96 This program is designed to make updating of files and source code both easier and quicker. It compares a list of files in a source directory to a list of files in a destination directory and copies any files that are newer than the ones found in the destination directory. This is quicker than copying all of the files with DOS wildcard commands and cleaner than copying everything when you only want some of the files in the destination area. The control card file: FILUPDAT requires an ASCII control card file to be created. The control card file can consist of five types of records: (1) comments: These records start with semi-colons or colons or are blank. They are available primarily for documenting what you're doing. (2) source directory: These records start with "-S" (or "-F" for "from") followed by the path to copy the files from. Something like "-SC:\QB45" works fine. (3) destination directory: These records start with "-D" (or "-T" for "to") followed by the path to copy the files to. For example, "-DJ:\EBBNEW\DOCS". (4) exclusion specification: These records start with "-X" followed by a space and one or more filespecs (typically with wildcards). For example, your main file specification may be "*.*" but you can exclude any QuickBASIC source code files or object modules by including a "-X *.BAS *.OBJ" statement. (5) files: These records have a single file name (for example, "EBBFFILE.WP") that is to be copied from the source directory to the destination directory. File specifications can include standard DOS wildcards ("*" and "?"). A comment can follow the file name provided the comment starts with a colon or a semi-colon. FILUPDAT.DOC 2 Revised: 12-22-96 Source and destination cards can be changed throughout the control card file. Files are copied based on the most recent source/destination card before the file card. Changing either the source or destination will reset the exclusion specification so you have to respecify the -X card if desired. Also note that cards are processed sequentially. The exclusion specification card only affects file name card(s) which occur after it. A sample control card file might look like this: ; Sample file -SC:\PDOX -DJ:\EBBNEW\PRGS CUSTOM.SC ADDRESS.SC ZIPCODE.SC ; Specifying another source file path; destination still the same -SC:\MINE NEWUSER.SC Specifying parameters: Parameters for this program can be set in the following ways. The last setting encountered always wins: - Read from an *.INI file (see BRUCEINI.DOC file), - Through the use of an environmental variable (SET FILUPDAT=whatever), or - From the command line (see "Syntax" below) FILUPDAT.DOC 3 Revised: 12-22-96 Syntax: FILUPDAT { ctlfile | /Cctlfile } [ /-A ] [ /-R ] [ /CLONE ] [ /Flist_file [ /OVERWRITE | /APPEND | /-OVERWRITE | /OVERASK ] ] [ /FULL ] [ /ABORT | /SKIP | /CREATE ] [ /MONO ] [ /Q ] [ /Iinitfile | /-I ] [ /? ] where: "ctlfile" or "/Cctlfile" is the name of the control statement file. It can include path information if necessary. "/Flist_file" says you want a text file created which tells you what files were considered and what happened to each of them. The "list_file" is the name of the file. This is primarily used for checking the operation of the utility. The file name can include path information if necessary; it must contain a period (use something like "/FTEST." if no extension is used). "/OVERWRITE" says that if the list_file already exists, don't prompt before overwriting it. "/APPEND" says to append to the list_file if it already exists. "/-OVERWRITE" says to abort if the output file exists already. "/OVERASK" says to prompt if the output file exists already. This is the default. "/FULL" says to write out full comparison information in the list_file. This is primarily for debugging purposes but it includes the numeric representation of the date and time for both the source and destination files. "/ALL" says to copy all files in your ctlfile regardless of relative ages. "/ABORT" says that if any source or destination subdirectory is missing, give an error message and abort the program. This is initially the default. "/SKIP" says that if any source or destination subdirectory is missing, give an error message, skip all files for that specification, but otherwise continue running the program. "/CREATE" says that if a destination subdirectory is missing, give an error message and try to create the subdirectory. If successful, copy the desired files to it. If not successful, skip all files for that specification but otherwise continue running the program. If the source subdirectory is not found, the program will operate as if /SKIP was specified. "/MONO" (or "/-COLOR") does not try to override screen colors. Initially defaults to "/COLOR". "/COLOR" (or "/-MONO") allows screen colors to be overridden. This is initially the default. "/Q" turns off the file-by-file status reporting. FILUPDAT.DOC 4 Revised: 12-22-96 "/Iinitfile" says to read an initialization file with the file name "initfile". The file specification *must* contain a period. Initfiles are described in the BRUCEINI.DOC file. Initially defaults to "/IFILUPDAT.INI". "/-I" (or "/INULL") says to skip loading the initialization file. "/?" or "/HELP" or "HELP" shows you the syntax for the command. Return codes: FILUPDAT returns the following ERRORLEVEL codes: 0 = no problems 250 = operation aborted by pressing Escape 251 = invalid control file or bad drive/subdirectory specification 252 = copy failed 253 = no files found to copy 255 = syntax problems, or /? requested Author: Bruce Guthrie Room H-4885 U.S. Dept of Commerce/ESA/STAT-USA Washington, DC 20230 voice: (202) 482-3234 e-mail: bguthrie@doc.gov You may freely copy and re-distribute this program; however, the U.S. Department of Commerce neither guarantees nor assures compatibility of the program with all computer software or hardware. Additional information about this and other Bruce Guthrie programs can be found in the file BRUCE.DOC which should be included in the original ZIP file. The recent change history for this and the other programs is provided in the HISTORY.ymm file which should be in the same ZIP file where "y" is replaced by the last digit of the year and "mm" is the two digit month of the release; HISTORY.611 came out in November 1996. This same naming convention is used in naming the ZIP file (FILUPymm.ZIP) that this program was included in. Please provide an Internet e-mail address on all correspondence.