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

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

DirDate is SHAREWARE, and may be trialed for 30 days. If you find DirDate
useful and plan to continue using it, you must pay for it. See the end of
the file for more details. Please register on the DirDate mailing list by
sending email to Simon Carter at launch@ozemail.com.au, with your name and
any comments.


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.


Features
========

    *   Can change the time and date of both files, directories and
        volume labels.
    *   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! I
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]


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

Typing

   dirdate -?   [Enter]

on its own will display usage information.

   Usage:
     dirdate [-S] [-N] [-D] <directory> [file=] [datepart [datepart...]]
   
       -S  Recurse into subdirectories
       -N  Don't make any changes (preview mode)
       -D  Change directories only
   
       Where [datepart] is one 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
         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
   

-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
-S  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
-D  Does not change files - only directories


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.


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 the Windows
directory (in a DOS shell under Windows 95):

   C:\BP\tpu>dirdate -s -n -c a:\*.* month=2 year=1996
   DirDate v2.5  Copyright (c) 1996,1998 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.


Registration
============

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, version of DirDate and
any relevant comments or suggestions. By registering DirDate I 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 my Web site (see below)?


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

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


Albert's Ambry
--------------

Direct URL:
http://www.alberts.com/Ambry/Register?File_Name=dirdate.zip&OS=DOS&Source=
AuthWWW

OR go to

  http://www.alberts.com

and search for: DirDate

Click on the "Buy it" hotlink to register DirDate.


Contact Information
===================

I am always happy to hear your comments! If you use and like DirDate, or
have any suggestions for improvements, please drop me 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 I will try to get back
            to you within 24 hours.
  Mail:     Simon Carter
            Crystal Software
            2 / 9 Woodbine Court
            Wantirna
            Victoria 3152
            AUSTRALIA.
    

