The Date Utilities DCOPY Command ________________________________________________________________ Purpose: Copy one or more files to the specified disk drive and path based on a comparison of the file date with a passed date. Format: DCOPY filename destination [date] [time] [-options] Where: everything between the two braces "[" and "]" is optional and, filename - is any valid file name with optional drive and path. The wildcards "*" and "?" may be used in the filename. destination - is any valid drive and path date - is a valid date of the form MM/DD/YY time - is a valid time of the form HH:MM:SS options - always start with the "-" character and include: a = archive, b = before, l = later, o = on, p = prompt. Remarks: This command functions in basically the same manner as the MS-DOS COPY command. However, DCOPY lets you copy files based on the file's creation date / update time stamp. There are three major differences between DCOPY and the MS-DOS command COPY. First, files are copied to the specified drive and path ONLY if each file date and time matches the optional condition(s) specified. Second, files can NOT be renamed as they are copied. Third, DCOPY will pause when your destination floppy, (A: or B:), becomes full. You can then change floppies, format a new floppy, or quit. DCOPY copies a file or group of files based on the file dates. Full wild card support is included for the file name. The global characters "?" and "*" can be used in in the file name and extension parameters. These global characters work in exactly the same way as they do with a COPY command. If you don't remember how to use DCOPY you can always type DCOPY{cr}, where {cr} signifies the return key. DCOPY will then print a help screen that tells you how to run the program. DCOPY offers five different options. Options may be grouped together in any combination. An option or group of options must always be preceded by the "-" character. Three of these options, (b, l, o), modify the way the specified date effects a copy. The "-b" option tells DCOPY to copy files created BEFORE the specified date. The "-o" option copies files created 1 The Date Utilities ON the specified date. The "-l" option copies files created LATER than, (after), the specified date. The remaining two options control special features. The "-a" option tells DCOPY to copy only those files that have not previously been archived. If you use this option DCOPY will only copy files that have not previously been backed up. The last option is "-p". This option causes DCOPY to pause and prompt you with the name of the file being copied. YOU decide whether or not to copy the file by responding with "Y" or "N". To use DCOPY you MUST specify a file name or pattern, and a destination drive at a minimum. If no date and time is included in the command, DCOPY assumes you want to copy files created or updated on the current day. Thus: dcopy *.* a: copies all files created or updated after 12:00 AM on the current day. This assumes the time and date set in your IBM PC, XT, or AT is correct. Making a copy of files based on a different time and date is just as easy. To do this DCOPY needs to know the date, (and optionally a time), and whether to copy files created: before, on, or after this date. Copy control is based on options. Note that if no TIME is specified the time is assumed to be 0:00, the previous day's midnight. dcopy *.obj b: 12/12/84 -ol copies all files from the default drive with the extension ".obj" that were created or last updated ON or LATER than 12 AM on 12/12/84 to the B: drive. The files copied to drive B: will have the same name and time stamp as they had on the default drive. dcopy b:work.* a: 1/2/85 15:00:00 -b copies all files from the B: drive that have the file name "work" and any extension, to the A: drive PROVIDED that the file was last created or updated before 3:00 PM on 1/2/85. dcopy c:\work\*.c d:\help 2/20/86 -o copies all files with the extension ".c" from the path c:\work to the path d:\help provided each file was last updated only on the day of 2/20/86. dcopy *.* b: 1/1/86 -olp 2 The Date Utilities copies all files to drive B: provided they were created on or later than 1/1/86. The user will be prompted before each file is copied with: Copy filename to b:filename (Y/N)? You must enter either a "Y" or "N" followed by a carriage return. Entering a "Y" tells DCOPY to proceed with the transfer of the file. Entering anything else will cause DCOPY to skip that one file. DCOPY also provides full archive file control with the "-a" option. Each file has a status bit that can be used to indicate whether it has been backed up. If you use the "-a" option DCOPY will only copy those files not marked as having been previously backed up. DCOPY will also mark the original file to indicate it has been backed up. Copying DCOPY has one other major feature that has not been Files mentioned yet. When you use DCOPY to copy to a to removable media, a floppy disk for example, DCOPY will Floppy pause when that disk becomes full. At this point you Disk can quit the copying process, insert a new formatted disk and continue, or format a new disk and then continue. DCOPY will prompt you with a message explaining what is going on when the disk becomes full. For example: We've run out of disk space on drive B: Put a new formatted disk in that drive and hit "C" to continue, OR hit "F" to format a new disk, OR hit "Q" to quit DCOPY now. Notes: DCOPY can handle directories of any length. However, the larger your disk directory the longer it will take DCOPY to process it. If you have a directory with 600 files in it it should take DCOPY about 6 seconds to read through the entire directory on an IBM AT, or 12 seconds on a PC. If it takes longer than this you should change your config.sys file to increase then number of buffers to BUFFERS=8. DCOPY first looks for a file match to your pattern and date. If one is found it is copied as soon as it is seen. The program then goes on to find the next match. If you use a wildcard like *.* and have very few dates that match it may seem like DCOPY is doing an excessive amount of disk access. This is not the case. DCOPY is simply finding each matching pattern and then checking the file date. This does take a little time. 3 The Date Utilities DERASE Command ________________________________________________________________ Purpose: Erase one or more files from the specified disk and path based on a comparison of the file date with a passed date. Format: DERASE filename [date] [time] [-options] Where: everything between the two braces "[" and "]" is optional and, filename - is any valid file name with optional drive and path. The wildcards "*" and "?" may be used in the filename. date - is a valid date of the form MM/DD/YY time - is a valid time of the form HH:MM:SS options - always start with the "-" character and include: b = before, l = later, o = on, p = prompt. Remarks: This command functions in basically the same manner as the MS-DOS ERASE command. DERASE, however, offers two major differences or improvements over the standard ERASE command. First, file erasure is based on a specified date. Files can be erased that were created before, on, or after a specified date. (Any combina- tion of these options is legal.) Second, a prompt first option lets you select individual files for erasure. DERASE deletes a file or group of files based on the file dates. Full wild card support is included for the file name. The global characters "?" and "*" can be used in in the file name and extension parameters. These global characters work in exactly the same way as they do with the ERASE command. If you don't remember how to use DERASE you can always type DERASE{cr}, where {cr} signifies the return key. DERASE will then print a help screen that tells you how to run the program. DERASE has four different options. Options may be grouped together in any combination. An option or group of options must always be preceded by the "-" character. Three of these options, (b, l, o), modify the way the specified date effects file deletion. The "-b" option tells DERASE to delete files created BEFORE the specified date. The "-o" option deletes files created ON the specified date. The "-l" option deletes files created LATER than, (after), the specified date. The last option is "-p". This option causes DERASE to 4 The Date Utilities pause and prompt you with the name of the file to be deleted. YOU decide whether or not to delete the file by typing a "Y" or "N". To use DERASE you MUST specify a file name or pattern at a minimum. If no date and time is included in the command, DERASE assumes you want to delete files created or updated on the current day. Thus: derase *.bak deletes all files with the extension .bak created or updated after 12:00 AM on the current day. This assumes the time and date set in your IBM PC, XT, or AT is correct. Deleting files based on a different time and date is just as easy. To do this DERASE needs to know the date, (and optionally a time), and whether to erase the files created: before, on, or later than this date. Deletion control is based on options. Note that if no TIME is specified the time is assumed to be 0:00, the previous days midnight. derase *.obj 12/12/84 -ol deletes all files from the default drive with the extension ".obj" that were created or last updated ON or LATER than 12 AM on 12/12/84. derase b:work.* 1/2/85 15:00:00 -b deletes all files from the B: drive that have the file name "work" and any extension, PROVIDED that the file was last created or updated before 3:00 PM on 1/2/85. derase c:\work\*.c 2/20/86 -o deletes all files with the extension ".c" from the path c:\work provided each file was last updated only on the day of 2/20/86. derase *.* 1/1/86 -olp deletes all files provided they were created on or later than 1/1/86. The user will be prompted before each file is erased with: Erase filename (Y/N)? You must enter either a "Y" or "N" followed by a car- riage return. Entering a "Y" tells DERASE to erase that file. Entering anything else will cause DERASE to leave that file alone. 5 The Date Utilities CDATE Command ________________________________________________________________ Purpose: Change the date of one or more files that fit the filename pattern passed. Format: CDATE filename [date] [time] [-options] Where: everything between the two braces "[" and "]" is optional and, filename - is any valid file name with optional drive and path. The wildcards "*" and "?" may be used in the filename. date - is a valid date of the form MM/DD/YY time - is a valid time of the form HH:MM:SS options - starts with the "-" character and includes: p = prompt before changing. Remarks: This command has no MS-DOS counterpart. CDATE changes the date of a file or group of files to a date passed in the command. Full wild card support is provided for the file name. The global characters "?" and "*" can be used in in the file name and extension parameters. These global characters work in exactly the same way as they do with all other MS-DOS commands. If you don't remember how to use CDATE you can always type CDATE{cr}, where {cr} signifies the return key. CDATE will then print a help screen that tells you how to run the program. CDATE has only a single option. Adding the "-p" option to the command causes CDATE to pause and prompt you with the name of the file whose date is to be changed. YOU decide whether or not to change the file date by typing a "Y" or "N". To use CDATE you MUST specify a file name or pattern at a minimum. If no date and time is included in the command, CDATE assumes you want to change the file date and time to the current system date and time. Thus: cdate *.bak changes the date of all files with the extension .bak to the current system time and date. Hopefully the time and date set in your IBM PC, XT, or AT is correct. Changing a file's date and time stamp to a specified date and time is just as easy. To do this CDATE needs a date, (and optionally a time). 6 The Date Utilities cdate *.obj 12/12/84 changes the date of all files on the default drive with the extension ".obj" to 12/12/84 00:00:00. cdate c:\work\*.c 2/20/86 15:00:00 changes the date of all files from the path C:\work that have the extension ".c" to 1/2/85, 3:00 PM. cdate *.* 1/1/86 -p changes the date of all files on the default drive to 1/1/86. The user will be prompted before each file date is changed with: Change the date of filename (Y/N)? You must enter either a "Y" or "N" followed by a car- riage return. Entering a "Y" tells CDATE to change the date of that file. Entering anything else will direct CDATE to leave that file alone. 7 The Date Utilities DDIR Command ________________________________________________________________ Purpose: List the directory of the specified disk and path. Directory is limited by date and may be sorted in one of several different ways. Format: DDIR filename [date] [time] [-options] Where: everything between the two braces "[" and "]" is optional and, filename - is any valid file name with optional drive and path. The wildcards "*" and "?" may be used in the filename. date - is a valid date of the form MM/DD/YY time - is a valid time of the form HH:MM:SS options - always start with the "-" character and include: b = before, l = later, o = on, p = prompt. Directory is normally sorted alphabetically by name but may be sorted by: d = date, e = extension, n = no sort, s = file size. Remarks: This command functions in basically the same manner as the MS-DOS DIR command. However, DDIR differs in several important ways. First, DDIR will automatically sort your directory alphabetically. You can optional change the sorting preference to sort by: extension, date, or file size. (You can also disable all sorting.) Second, DDIR displays directory entries limited by a passed file date. DDIR displays directory entries based on the file dates plus other constraints. Full wild card support is included for the file name. The global characters "?" and "*" can be used in in the file name and extension parameters. These global characters work in exactly the same way as they do with a DIR command. If you don't remember how to use DDIR you can always type DDIR{cr}, where {cr} signifies the return key. DDIR will then print a help screen that tells you how to run the program. DDIR offers seven different options. All options, except sorting order control, may be grouped together in any combination. An option or group of options must always be preceded by the "-" character. Three of these options, (b, l, o), modify the way the specified date effects a directory. The "-b" option tells DDIR to display only files created BEFORE the specified date. The "-o" option displays files created ON the 8 The Date Utilities specified date. The "-l" option displays files created later than, (after), the specified date. The remaining four options control the order that the directories are sorted. Directories are normally sorted alphabetically by file name. The d, e, n, & s options change the order that a directory will be sorted in. The "-d" option sorts a directory based on the file dates. The "-e" option sorts the directory alphabetically based on file extension. The "-n" option disables sorting of the directory. Finally, the "-s" option sorts a directory based on file size. To use DDIR you MUST specify a file name or pattern at a minimum. If no date and time is included in the command, DDIR assumes you want the directory of all files created or updated on the current day. Thus: ddir *.* displays the directory of all files created or updated after 12:00 AM on the current day. This assumes the time and date set in your IBM PC, XT, or AT is correct. Displaying directories of files created on a different time and date is just as easy. To do this DDIR needs to know the date, (and optionally a time), and whether to display files created: before, on, or later than this date. Note that if no TIME is specified the time is assumed to be 0:00, the previous days midnight. ddir *.obj 12/12/84 -ol displays the directory of all files on the default drive with the extension ".obj" that were created or last updated ON or LATER than 12 AM on 12/12/84. The files will be displayed in alphabetical order. ddir b:work.* 1/2/85 15:00:00 -bd displays the directory of all files from the B: drive that have the file name "work" and any extension, PROVIDED that the file was last created or updated before 3:00 PM on 1/2/85. The files will be sorted in ascending order based on file date, (oldest first). ddir c:\work\*.c 2/20/86 -oe displays the directory of all files with the extension ".c" from the path c:\work provided each file was last updated on the day of 2/20/86. The directory will be sorted alphabetically based on file extension. ddir *.* 1/1/86 -ln 9 The Date Utilities displays the directory of all files provided they were created later than 1/1/86. No sorting of the directory will take place. ddir *.* 1/1/86 -ls displays the directory of all files provided they were created later than 1/1/86. Files will be sorted based on file size. Notes: DDIR can only handle directories that have 2048 or less entries. The larger your disk directory the longer it will take DDIR to process it. Finding and sorting files takes time. If it takes to long to sort your large directories try changing your config.sys file to increase then number of buffers to BUFFERS=8. 10 The Date Utilities DISTRIBUTION NOTICE This package of utilities is protected by United States Copyright law and by International Treaty provisions. You may distribute, or share the "demo" version of these utilities with anyone provided the following conditions are met: A "demo" version of the DATE UTILITIES is being distributed at no charge to all who are interested in it. To those of you unfamiliar with this approach, it works like this. These utilities are distributed to various BBS systems and user groups. You may copy the program and use it for no charge. Gary Elfring does not handle the actual distribution of this program. The BBS version of this program has been INTENTIONALLY limited. It will only work until 9/1/86 and will not format disks for you. This limitation is imposed because very few people pay for these programs otherwise. If you regularly pay for programs like this, sorry for the inconvenience. NOTE: that even though this version is time limited it is fully functional. Try the BBS version out. If the product does not meet your needs, you pay nothing. If the product does meet your needs, and you can use it, then send us the introductory price of $30.00 U.S. This price is only good through 9/1/86 and may be withdrawn at any time. I will then supply you with the real version of the DATE UTILITIES, (none are time limited or copy protected), along with quality documentation for that version. I accept check, money order, Master Card, VISA, or good old fashioned cash. These utilities include: DCOPY - Copy files based on wildcard and date DERASE - Erase files based on wildcard and date DDIR - Display files based on wildcard and date CDATE - Change a files time and date stamp Send check or money order to: Gary Elfring 4N899 West Mary Drive St. Charles, Illinois 60174 312-377-3520 Even if you do not contribute, you are encouraged to copy and distribute the BBS version of the product freely subject to the following restrictions: 1. Do not distribute altered copies. If you have suggestions or fixes you would like to see, send us a written note. We welcome all responses. 2. This product must be distributed complete including the files: DCOPY.EXE, DERASE.EXE, CDATE.EXE, DDIR.EXE, & DATEUTIL.DOC. 11 The Date Utilities 3. No fee is to be charged for copying or distributing the pro- gram without an express WRITTEN agreement from Gary Elfring. The ONLY exception to this rule is: a small charge, ($5 to $10), may be leveled if this program is included on a set of public domain disks. This charge must be reasonable and represent only copying and disk fees. 4. Commercial sale of this product in any manner is prohibited without Gary Elfring's written permission. User Groups/Clubs: Gary Elfring's products may be distributed by Clubs and User Groups subject to the same restrictions. We would ask only that contributions to our continuing efforts be encour- aged by those performing such distribution. Computer Bulletin Boards: Gary Elfring's products may be dis- tributed by BBS's subject to the same restrictions and contribu- tion encouragement. WARRANTY Gary Elfring specifically disclaims all warranties, expressed or implied, including but not limited to, implied warranties of merchantability and fitness for a particular purpose with respect to defects in the disk or documentation, and the program license granted herein. In no event shall Elfring be liable for any loss of profit or any other commercial damage, including but not limited to special, incidental, consequential, or other damages. 12