Y2K: Cinderella - DIR, LIST, ZIP, BACKUP with MSDOS - Topic 002

CATEGORY: basic file functions, directory display, file backup and restore. Standard supplied functionality.

SUMMARY:

The critical feature of interest in MS DOS is the file management system. Directory structures use Binary dates. The date can be set between 1980 and 2099.

Thus, if the correct current date is set, the correct date will be written to the directory. Provided comparisons are done on this binary date, all is well.

Display of the date (or reading of the date within a program) are the areas where problems arise.

In general, handling of file dates within MSDOS is acceptable.

TEST: for Y2K date discrimination in MSDOS (6.20) environments.

RESULTS:

1. Acceptable, ISO/ANSI/FIPS standard, YYYYMMDD

Microsoft Windows 3.1. In the configuration section in "International" you can specify a ymd format, Century form, with leading zero months and days.

Most major system utilities and application programs should then use this format successfully.

*Exception Sighted is FileManager, Index 8

2. Acceptable, Non-ISO Standard, MMDDYYYY

LIST by Vern Buerg (9.1k). (Previous 7.x versions do not display 4 digit year)

CPBACKUP V6 Central Point Backup/Restore actually sees and reports 20xx form for files, with correct date discrimination and visibility.

Setting the date to 2001 and creating another backup set, CPBACKUP displays the Diskette date as 01-01-10, irrespective of whether 2000 or 2001 disk sets are used. Although pkzip displays the date as 2 digits, its logic correctly identifies the 00 as being later than say 96.

3. Acceptable, Old standard, MMDDYY or YYMMDD

Note: in a US config without special code tables etc, setting the following line in CONFIG.SYS "COUNTRY=002,,c:\dos\country.sys" will effectively change your DIR date format to YY/MM/DD without affecting your keyboard table. The DATE command will also request dates in YY-MM-DD form.

MS DOS 6.20 (Microsoft)

Dates are stored in correct (binary) format in the directory. Display of these dates is another matter. (See note on COUNTRY above). DIR may display mm/dd/yy, but DIR /OD and DIR /O-D correctly sequence dates. e.g. 96 low, 00 high, 01 higher.

Pkzip 2.04g by Phil Katz

Old form display, date logic correct. A Pkunzip -n working on an archive where files are dated 00 correctly overwrites files dated 96 and ignores files which are 00.

MSBACKUP 6 (Microsoft)

works by image copy without date discrimination.

MSBACKUP 6.0 displays the dates of files backed up on 01/01/2000 as 01-01-ST, although dates less than 99 are shown as 2 digits. The restore does not discriminate by date. The entire backup set is restored, with an option to overwrite or not based on existence. No indication is given of size or date of either file at this time, only file name.

Winlink 1.21c East Coast Software

Years in the 20xx ranges display junk. Compare and copy functions appear to use binary date. Correct date logic appears to work in Update and Equalise mode i.e. the "newer" file is detected and that file with its date are correctly transferred to the other system.

4. Unacceptable. none found, to date.

METHOD USED: Trial and error

Tools: Editor, TOUCH (Borland 3)

1. Directory dates

Setup was for standard US operation, default mm/dd/yy. (No COUNTRY= setting in Config.sys) A simple batch file was used to set various dates and copy a dummy TEST.DAT file to specially named YYYYMMDD.DAT files. The TOUCH program then ensured that the current date was set on the directory record.

date 02-29-2000
copy test.dat 20000229.dat
touch 20000229.dat
date 03-01-2001
copy test.dat 20010301.dat
touch 20010301.dat
date 04-02-2002
copy test.dat 20020402.dat
touch 20020402.dat
date 05-03-2003
copy test.dat 20030503.dat
touch 20030503.dat
date 06-04-2049
copy test.dat 20490604.dat
touch 20490604.dat
date 07-05-2050
copy test.dat 20500705.dat
touch 20500705.dat
date 08-06-2080
copy test.dat 20800806.dat
touch 20800806.dat
date 09-07-2081
copy test.dat 20810907.dat
touch 20810907.dat
date 10-08-2096
copy test.dat 20961008.dat
touch 20961008.dat
date 11-23-1996
dir /od
Essentially, the binary dates in the directory operate correctly. Despite the peculiarities of display the dates sequence correctly and the system distinguishes between 1996 and 2096.

2. PKZIP testing.

The dummy files above were subjected to the following procedure for system dates 11/23/96, 01/01/2000 and 01/01/2001.

a. TOUCH *.* (sets all files in directory to date)
b. PKZIP -ex YYYYMMDD (for each relevant trial date)
c. Create backup diskettes using CPBACKUP and MSBACK.
The net result was three zip files containing embedded dates.

The next trial was to use PKUNZIP -n YYYYMMDD.zip to see if the "new only" option would respect 2000 type dates.

The tests were successful in that if the file date on disk was "higher" than the file in the zip, it was not overwritten. Similarly, if files on disk had "lower" dates than the zip, they were correctly overwritten. The conclusion is that PKZIP uses internal binary dates, and works correctly.

3. Backup/Restore

In scenario (2) above, diskette backup sets were taken on the three system dates. We then attempted to restore selectively and by directory, trying the backups in different sequences.

FURTHER ACTION: These tests need to be run on MSDOS 3.2 thru 6.22 and OS/2, and be verified.

VERIFICATION FEEDBACK REQUESTED:

Please send feedback to the group that you have performed the above (or similar tests) and that you are satisfied that the conclusions reached in this topic are valid (or otherwise). Comments on other programs in this category are welcome.

Comments are invited.

Usual disclaimers. Trademarks mentioned (if any) belong to their owners.

Chris Anderson
1996/11/29

Sponsored in part by

Try Me?