NAMEDATE Version 5.03
Copyright (c) 1999, 2002-2005 by James Greene. All rights reserved.
http://www.informatics-consulting.ch

NAMEDATE adds a date to a given file's name.

Usage:

	NAMEDATE.EXE [switches] filenames(s)

where [switches] may be

 (**) /F = put the date before the original filename
 (**) /X = put the date as an extension to the original filename
  (*) /8 = Use DOS 8.3 filenames (xxYYMMDD.ext)

      /Z:"[format]" = date format (see documentation)
      /ZZ:"[format]" = enhanced format (see documentation)           (new in v5.0)

      /M = use the file's modification date/time
      /O+[d] = add [d] days to the date
      /O-[d] = subtract [d] days from the date
      /A+[m] = add [m] minutes to the time
      /A-[m] = subtract [m] minutes from the time

      /U = convert any spaces in the filename to underscores

      /D = rename directories as well as files
      /H = rename system and hidden files
      /C = copy file instead of renaming it
      /S:"[path]" = rename or copy the files into directory [path]

      /B:[n] = Set the buffer size to allow for up to n files.       (new in v5.0)

      /K = force operation (Kill target file if it exists)
      /Y = Automatically YES all confirmation checks.                (new in v5.0)
      /Q = Quiet operation - no information messages

Legacy switches (Downward Compatibility)
  (*) /N = numeric form: Same as /Z:"d-m-Y"
  (*) /R = reverse numeric form: Same as /Z:"Y-m-d"
  (*) /T = add the time: Same as adding /Z:"-H-M"

  (*) These options is not compatible with the /Z or /ZZ option.
 (**) These options are not compatible with the /ZZ option.

Notes:

	/F and /X are exclusive. If neither is defined, the date is placed after the original filename:

	Original Filename:	sample.txt

	Example 1:			NAMEDATE "sample.txt"
						renames "sample.txt" to "sample 01-Jul-2003.txt"

	Example 2:			NAMEDATE /F "sample.txt"
						renames "sample.txt" to "01-Jul-2003 sample.txt"

	Example 3:			NAMEDATE /X "sample.txt"
						renames "sample.txt" to "sample.01-Jul-2003.txt"

	/Z defines how the date should be formatted. The following keys are used:

		a	Abbreviated weekday name
		A	Full weekday name
		b	Abbreviated month name
		B	Full month name
		d	Day of month as decimal number (01-31)
		H	Hour in 24-hour format (00-23)
		I	Hour in 12-hour format (01-12)
		j	Day of year as decimal number (001-366)
		m	Month as decimal number (01-12)
		M	Minute as decimal number (00-59)
		p	Current locales A.M./P.M. indicator for 12-hour clock
		S	Second as decimal number (00-59)
		U	Week of year as decimal number, with Sunday as first day of week (00-53)
		w	Weekday as decimal number (0-6; Sunday is 0)
		W	Week of year as decimal number, with Monday as first day of week (00-53)
		y	Year without century, as decimal number (00-99)
		Y	Year with century, as decimal number
		z	Time-zone name or abbreviation; no characters if time zone is unknown
		Z	Same as z

	When /ZZ is used, the following three options are available:
		F   The filename (without the extension)
		X   The file extension (without the leading dot).
		C   A 4-digit counter of the number of files renamed.

	If you want to add text that uses any of the above characters, preceed the character
	with a backslash (see Example 6).

	Original Filename:	sample.txt

	Example 4:			NAMEDATE /XZ:"Ymd" "sample.txt"
						renames "sample.txt" to "sample.20030701.txt"

	Example 5:			NAMEDATE /Z:"Y-m-d H-M-S" "sample.txt"
						renames "sample.txt" to "sample 2003-07-01 17-56-39.txt"

	Example 6:			NAMEDATE /Z:"Y-m-d \at I.M.S p" "sample.txt"
						renames "sample.txt" to "sample 2003-07-01 at 05.56.39 PM.txt"

	Example 7:			NAMEDATE /ZZ:"F Y-m-d H-M-S.X" "sample.txt"
						renames "sample.txt" to "sample 2003-07-01 17-56-39.txt"

	Example 8:			NAMEDATE /ZZ:"F Y-m-d C.X" "sample*.txt"
						renames "sampleA.txt" to "sampleA 2003-07-01 0001.txt"
						renames "sampleB.txt" to "sampleB 2003-07-01 0002.txt"

	/M uses the file date and time instead of the current date and time.
	/O+[d] = add [d] days to the date
	/O-[d] = subtract [d] days from the date
	/A+[m] = add [m] minutes to the time
	/A-[m] = subtract [m] minutes from the time

	Original Filename:	sample.txt

	Example 9:			NAMEDATE /O+3 "sample.txt"
						renames "sample.txt" to "sample 04-Jul-2003.txt"

	Example 10:			NAMEDATE /A+4 /Z:"Y-m-d H-M-S" "sample.txt"
						renames "sample.txt" to "sample 2003-07-01 21-56-39.txt"

	/U converts any spaces in the filename to underscores.

	Example 11:			NAMEDATE /U "sample.txt"
						renames "sample.txt" to "sample_01-Jul-2003.txt"

	/C creates a copy of the file instead of renaming it.

	Example 12:			NAMEDATE /C "sample.txt"
						*copies* "sample.txt" to "sample 01-Jul-2003.txt"

	/8 overrides the /Z command. The file will be renamed to
	"AAyymmdd.ext", where yymmdd is the date (yy=year mm=month
	dd=day). If more than one file is to be renamed, the second file
	will be named BAyymmdd.ext, the next CAyymmdd.ext, and so in.
	The 26th file will be ZAyymmdd.ext, the 27th then AByymmdd.ext.

	Example 13:			NAMEDATE /8 "sample.txt"
						renames "sample.txt" to "AA0300701.txt"

	/S:"[path] is used to move the file into a new directory (or
	copy it, when used in conjunction with the /C command) while
	renaming it.

	Example 14: 		NAMEDATE /CS:"C:\BACKUP" "sample.txt"
						*copies* "sample.txt" to "C:\BACKUP\sample 01-Jul-2003.txt"



Building NAMEDATE
	If you have the Microsoft C++ compiler installed, there is a makefile provided.

	To build NAMEDATE, just expand the source archive and enter the command

		NMAKE /f "NameDate.mak" CFG="NameDate - Win32 Release"



Disclaimer / Warranty:

	NAMEDATE comes with NO WARRANTY to the extent permitted by law.
	You may redistribute copies of NAMEDATE under the terms of the
	GNU General Public License. For more information about these
	matters, see the file named COPYING.txt, or contact the author
	at <james.greene@bluewin.ch>

	Please report any bugs to <james.greene@bluewin.ch>

