DIRDATE v2.7 - DIRECTORY (and file) Date Changer
================================================

Copyright (c) 1996,1999 Simon A Carter for Crystal Software

DirDate is SHAREWARE and may be trialed for a period of 30 days. After
this time you must either purchase the registered version (for $15) or
cease using the shareware version.

Please register your USAGE of DirDate by sending email to
launch@ozemail.com.au, with your name and address, the version of DirDate
you are using and any relevant comments or suggestions. By registering
DirDate we can inform you of updates or improvements and let you know when
the next version is released.

If you like and use DirDate, how about linking to our Web site (see
below)?

Please read the file ORDER.TXT for other registration options.


Online Web Registration
=======================

The registered version of DirDate can be purchased and received
immediately on the Internet, eliminating shipping and handling costs.

Direct URL: https://www.regnow.com/softsell/nph-softsell.cgi?item=1496-17


Contact Information
===================
We are always happy to hear your comments! If you use and like DirDate, or
have any suggestions for improvements, please drop us a line! Other user's
suggestions have made it what it is today.

Email:      launch@ozemail.com.au
  WWW:      http://www.ozemail.com.au/~launch
  Fax:      +61 (3) 9800-3078
Voice:      +61 (3) 9888-3104. After hours number. Please leave a
           contact name, number and time, and we will try to get back
           to you within 24 hours.
 Mail:      Simon Carter
           Crystal Software
           2 / 9 Woodbine Court
           Wantirna
           Victoria 3152
           AUSTRALIA.


Benefits
========

DOS does not provide any capabilities to change the date of directories or
volume labels, and this is the gap that DirDate fills. DirDate can change
any part of the date and/or time on any disk file, directory or volume
label, whether it is located in the root directory or a subdirectory. It
can be used to indicate to search utilities that the contents of a
directory have been updated. DirDate skips altering Windows 95 long
filenames. Any part of the date and/or time can be set to the current
date/time, or to a specified value. Dates may be set to the same date as
that of a reference file, or to the date of a reference file modified by
subsequent values.

DirDate can be used to backdate files. When used in conjunction with
setting the system date backwards, this is a very effective means of
avoiding Y2K (Year 2000) problems, particularly when the hardware is
dedicated to one task (so the date doesn't impact other systems).


Features
========

    *   Can change the time and date of both files, directories and
        volume labels
    *   Change the attributes of files and directories
    *   Change the size of files and directories
    *   Supports wildcards
    *   Supports recursion into subdirectories
    *   Can selectively change only the hours, minutes, seconds, day,
        month or year of the file without affecting other values
    *   Can set time/date to current time and date, or any part of the
        time/date to the current value or a specified value
    *   Can use a reference file and set all file dates to the date of
        the reference file
    *   Has a preview mode where no changes are actually made
    *   Skips altering Windows 95 long filenames.


WARNING - PLEASE READ
=====================

This program bypasses DOS and directly modifies the directory entries on
your hard disk. It is possible that incorrect or even correct use of this
program may damage your system, so use it with CAUTION! If you don't know
what you are doing, don't use it! And above all, make a BACKUP FIRST! We
will NOT be held responsible. Make use of the -N option as a trial first.


Installation
============

Just copy DIRDATE.EXE to a directory in your path, for example, to C:\DOS.
To find out the directories in your path, type

   c:\> path    [Enter]


Y2K - the Year 2000 problem
===========================

Going into the reasons for this problem is out of scope for this manual.
The problem can easily be avoided, particularly on dedicated machines,
simply by subtracting 14 from the year of every file, and also setting the
system date back 14 years.

By reversing the date by 14 years, the day of the week (Monday, Tuesday
etc) will still be correct.


How to use DirDate
==================

Typing

   dirdate -?   [Enter]

on its own will display usage information.
   Usage:
     dirdate [options] <directory> [file=] [date parts]
   
   Where [options] is one or more of:
   /a       Set or reset attributes [+|-][RASHVD] e.g. /a-r+a-s-h
            a=archive  r=read only  s=system  h=hidden  v=volume id
   d=directory
            (Only use v and d if you know what you're doing!)
   /c       Confirm each change individually
   /d       Change directories only
   /f       Disable fixing of invalid dates
   /n       Don't make any changes (preview mode)
   /r       Recurse into subdirectories
   /s<size> Set size of file e.g. /s100000 (expert users only)
   
   Where [date parts] is one or more of:
    d or date=<mm-dd-yyyy>      (Note 4 digit year)
    t or time=<hh:mm:ss>        (Note 24 hour format)
         hour=<hours>           0..23
          min=<minutes>         0..59
          sec=<seconds>         0..58 (even values only)
          day=<day>             1..31
        month=<month>           1..12
         year=<year>            1980..2099
         year=+<value>          increase year by value
         year=-<value>          decrease year by value
         file=<reference file>  Set to date of reference file
   
     $=current e.g. hour=$  means set hour only to the current hour
     No date parts = Now
   

/a      Change file or directory attributes. Any of the standard
        attributes can be changed:
            Read Only    specifies that the entry cannot be deleted
            Archive originally used to specify if the entry has had a
                     copy made elsewhere ie has been archived. A file
                     without the archive bit set is an original
            System  marks the entry as a System file (which does not
                     usually appear in directory lists)
            Hidden  marks the entry as a Hidden file (which does not
                     usually appear in directory lists). Marking a
                     directory with this attribute prevents it from being
                     displayed in directory lists.
            Volume Id    marks the entry as a Volume Id. Normally this
                     attribute is used on its own.
            Directory    marks the entry as a Directory. Do not play with
                     this attribute if you do not know what you are doing
                     - this can easily destroy file and directory
                     structures!
        
/c      Confirm each change individually
/d      Does not change files - only directories
/f      Do not fix or check for invalid dates. Only use this option if
        you know what you are doing, because it will allow 29 Feb in non-
        leap years, more than 59 seconds or minutes in an hour etc.
/n      Preview mode - DirDate runs as normal, but no changes are written
        back to disk. This is very useful if you are unsure about which
        files DirDate is going to modify
/r      Tells DirDate that if it finds any subdirectories in the starting
        directory, it should go into them also and modify the dates and
        times on any files and subdirectories e.g. If you started DirDate
        -S in the Windows directory, as well as modifying the time and
        date on all files and subdirectory entries in the Windows
        directory, it would also enter each subdirectory (System, MsApps
        etc) and change the files and directories found there
/s<size Sets the size of the entry to the given value. This should not be
>       used on directories, and used with care on files.


The initial path is NOT optional. If it is the current directory, use "."
as the directory name. To change the date of a directory, specify the name
of the directory e.g.

   dirdate c:\windows\system year=1995

This affects only the specified directory, and not any of the files in it.
To change the date of a group of files, specify them as follows:

   dirdate c:\windows\system\*.dll year=1995

The affects only files and directories in the "c:\windows\system"
directory that match the wildcard "*.dll". If you had a directory called
"old.dll" it would also be changed. The recursion into subdirectories does
not depend on the directory name matching the wildcard.

Every date and time part can be individually manipulated without effecting
any other part. The valid ranges for each date part are shown above. The
special date part FILE (which must appear first), may be used to "grab"
the date and time value from a reference file. This may then be modified
by subsequent date parts. For example, if you were releasing a program,
and you wanted the dates and times on all of the files to be the same as
the main program, you could use

   dirdate /s c:\my_prog FILE=c:\my_prog\runme.exe

You could also use subsequent date parts to set the time field to the
version number of the program, as is commonly done:

   dirdate /s c:\my_prog FILE=c:\my_prog\runme.exe HOUR=4 MIN=3 SEC=0

DOS does not allow odd values of seconds, and any odd value you provide
will be rounded down to the nearest second.

When DirDate runs, it first validates its input and shows the changes that
it is going to perform. It then prints out the name of each file changed
as it traverses the file list. Files not changed are prefixed with "No
change for". Files modified have "Changing" prefixed. If the month is
February and the day is greater than 29, DirDate warns you that the date
may wrap into March. This can cause unpredictable results in other
programs if not corrected.


Redirecting Output
==================

DirDate's output can be redirected to any device. For example, to save
DirDate's output to the file output.txt, you can type:

   c:\> dirdate > output.txt    [Enter]

To add DirDate output to an existing file exists.txt, type

   c:\> dirdate >> exists.txt    [Enter]

To send DirDate's output to the printer, type

   c:\> dirdate > prn    [Enter]

To view a convenient page-by-page display of DirDate's output, type

   c:\> dirdate | more    [Enter]


DirDate Example
===============

The output below was generated from running DirDate (in a DOS shell under
Windows 95):

   C:\BP\tpu>dirdate /r /n /c a:\*.* month=2 year=1996
   DirDate v2.7  Copyright (c) 1996,1999 Simon Carter for Crystal
   Software
   
   Recursing into subdirectories
   Disabling writes (preview mode)
   Confirming each change individually
   Setting MONTH=2
   Setting YEAR=1996
   
   A:\LFNBAT.CCT    Change? Yes,No,All,Exit: Yes
   A:\DIRSIZE.CCT   Change? Yes,No,All,Exit: No
   A:\DIRSIZE.DOC   Change? Yes,No,All,Exit: No
   A:\DIRSIZE.GAR   Change? Yes,No,All,Exit: No
   A:\DIRSIZE.QQQ   Change? Yes,No,All,Exit: No
   A:\DIRSIZE.SIM   Change? Yes,No,All,Exit: No
   A:\LFNBAT.DOC    Change? Yes,No,All,Exit: Yes
   A:\LFNBAT.GAR    Change? Yes,No,All,Exit: Yes
   A:\LFNBAT.QQQ    Change? Yes,No,All,Exit: Yes
   A:\LFNBAT.SIM    Change? Yes,No,All,Exit: Yes
   A:\DIRDATE       Change? Yes,No,All,Exit: Yes
   A:\DIRDATE\.             Change? Yes,No,All,Exit: Yes
   A:\DIRDATE\..            Change? Yes,No,All,Exit: Yes
   Rounding day down - 30 > 29 days in month 2
   A:\DIRDATE\DESC.SDI      Change? Yes,No,All,Exit: Yes
   A:\DIRDATE\DIRDATE.CCT   Change? Yes,No,All,Exit: Changing all
   remaining files
   A:\DIRDATE\DIRDATE.GAR
   A:\DIRDATE\DIRDATE.QQQ
   A:\DIRDATE\DIRDATE.SIM
   Rounding day down - 30 > 29 days in month 2
   A:\DIRDATE\FILE_ID.DIZ
   A:\DIRDATE\DIRDAT23.ZIP
   A:\DIRDATE\DIRDATE.ZIP


Windows 95
==========

DirDate will not work on hard disks or floppy drives if they are protected
by Windows 95 (usually only hard disks are protected, floppies can be
modified). Windows 95 does this to prevent old utilities from destroying
long filenames, which DirDate does not do.

DirDate does not handle Windows 95 long filenames provided as a parameter.
If you want to specify a long pathname to start in, you must use the short
form e.g. "c:\progra~1" instead of "c:\Program Files". If DirDate finds a
Windows 95 long filename entry it will automatically skip it. In almost
all cases, Windows 95 long filename entries will fail any wildcard match,
unless the wildcard match is *.*. Long filename entries are stored
differently to normal directory entries, and altering the time or date of
the abbreviated version of a Windows 95 long filename will not effect the
long filename time or date at all. For example, if you changed the
time/date of "c:\Program~1" and then did a DIR, you would find the
original date and time unchanged. This is because DOS 7 gets the date and
time information from the Windows 95 long filename entry, not the
abbreviated entry. You can still change the date/time on files that do not
have long filename entries.


We recommend the use of the freeware Win95 utility DOSExplorer,

  http://users.aol.com/felhasan

This program adds a right-click menu option to Windows Explorer, giving
the option to return to a DOS prompt from which DirDate can be run.
