Contents of the NFD107.DOC file
Version: 1.00 - 07 Mar 86
********** revised 1.07 18 Sep 90; Getting ready for the 21st century
Allow file dates from 1/1/80 - 12/31/2079
********** revised 1.06 12 May 89; Reversed change made in 1.04
********** revision 1.05 23 Feb 88: Various cosmetic changes
********** revision 1.04 25 Nov 87: revised GetPath for explicit filename use
********** revision 1.03 28 Oct 87: revised "Usage . . ." to add switches
********** revision 1.02 20 Oct 87: revised GetArgs to allow "Usage . . ."
revised for MASM 4.0 assembly
********** revision 1.01 ?????????
The NFD utility allows setting the date and time stamps for a disk file.
NFD was developed out of a sort of a combination of two other programs; FDATE
and TOUCH. Since the result looks a little more like FDATE, the name NFD,
signifying New FDATE was selected (in fact, this document is little more than
a modification of the original FDATE document.) The major differences between
NFD and FDATE are:
1. NFD can use ambiguous file name; i.e. file names containing DOS
2. NFD, by default, gives a console display of its actions.
3. NFD, by default, will query the operator for confirmation before
changing the Date/Time of any file.
The syntax of the command is:
NFD [filename] [date] [time] [switches]
where the filename must be specified and may be any standard DOS path name and
the File Name element may contain DOS 'wild cards'.
The date, time, and switches are optional and can appear in any order.
Date can be mm/dd/yy or mm-dd-yy. If yy is less than 80 (00-79), the
date will considered to be 20yy, otherwise the date will be considered
to be 19yy.
Time is hh:mm:ss with the seconds optional
The switches are '\n','/n','/N','\N', and/or '\s','/s','/S','\S'.
The '\n' switch indicate No Query; the normal mode of operation is to query
the operator prior to changing the Date/Time for each file. If the '\n'
switch is used, the change will be made without querying the operator. The
'\s' switch indicates Silent operations. By default, for each file changed,
the file name, the old Date/Time, and the new Date/Time will be displayed. If
the '\s' switch is used, this display will be suppressed.
If either the date or time or both are specified, the respective date and
time information in the directory entry for the file is set appropriately. If
only one is specified, the other is left with its original value. If neither
the date or time is specified on the command line, then the file's date and
time stamps are set from the current date and time in the DOS clock.
The filename can include normal drive and path specifications.
Warning: Although most cases of illegal date and time formats will be
detected, it was not deemed worth the effort or memory to try and detect all
possible pathological cases, so trying to fool it will not lead to happy
Note: The time recorded by DOS in the directory entry is kept in TWO
second intervals, so the second specified is truncated to an even value.
1. The following command would change the Date/Time of every file in the
DOS 'current' directory the the current date and time:
For each file, NFD would display the file name, the old time and date,
and the new time and date and request confirmation of the change from the
operator before making the change as shown below (the display has been
shortened slightly to fit the page format:)
NFD.000 From: 03-07-86 5:38a To: 03-07-86 7:51p Change? y
NFD.ASM From: 03-07-86 5:38a To: 03-07-86 7:51p Change? y
NFD.COM From: 03-07-86 5:38a To: 03-07-86 7:51p Change? y
NFD.DOC From: 03-07-86 5:50a To: 03-07-86 7:51p Change? y
2. The following command would change the Date/Time of every file in the
DOS 'current' directory to 02/23/84 at 11:45:
A>NFD *.* 02/23/84 16:45
again, before making the change for each file, NFD will request confirmation
from the operator as shown below:
NFD.000 From: 03-07-86 2:51p To: 02-23-84 4:45p Change? y
NFD.ASM From: 03-07-86 2:51p To: 02-23-84 4:45p Change? y
NFD.COM From: 03-07-86 2:51p To: 02-23-84 4:45p Change? y
NFD.DOC From: 03-07-86 2:56a To: 02-23-84 4:45p Change? y
3. The following command would change the Date/Time of every file in the
'current' directory to the current time and date without requesting operator
A>NFD *.* /N
NFD.000 From: 02-23-84 11:45a To: 03-07-86 8:00a
NFD.ASM From: 02-23-84 11:45a To: 03-07-86 8:00a
NFD.COM From: 02-23-84 11:45a To: 03-07-86 8:00a
NFD.DOC From: 03-07-86 6:00p To: 03-07-86 8:00a
4. The following command would change the Date/Time of every file in the
current directory to the current time and date without requesting operator
confirmation and without showing the changes being made:
A>NFD *.* /NS
I believe that an example of the output for this form of the command is
5.Finally, NFD can also change just a specific file:
NFD.DOC From: 03-07-86 8:00p To: 03-07-86 8:37p Change? y
All of the options for dates, times, and switches apply regardless of the
form of the file name.
I am dubious of the general utility of NFD, I don't believe that many
people have a frequent need to change the Date/Time stamping of their files,
however, NFD was developed because I did have a very real need to change them
on my system and other people may well encounter similar circumstances.
Someone, I believe that it was Sol Libes of MicroSystems/Journal, once
referred to the Public Domain software collection for CP/M as a "spare parts
bin for hackers". I believe that his assessment was valid if you use the term
"hacker' in its older sense. - Most of the work that I did on CP/M contained
portions removed from other Public Domain programs. Neither FDATE nor TOUCH
carried any copyright notices, either in the documentation or in the code
itself, a rare circumstance in the 16-bit world of PC/MS-DOS! This program,
which contains pieces of both as well as some of my own original code, is NOT