James Greene
INFORMATICS CONSULTING
    Fachbüro für EDV Beratung, Systeme und Dienstleistungen

NAMEDATE: Add the date to a given filename

Version 6.00
Copyright (c) 1999, 2002, 2003, 2004, 2005, 2006, 2007


CONTENTS

  1. What is NAMEDATE
  2. Installing NAMEDATE
  3. Using NAMEDATE
  4. Examples
  5. Known Issues and Limitations
  6. Support
  7. Source Code availability

What is NAMEDATE?

NAMEDATE is a command line utility for Windows 9x/Me/NT/2000/XP. NAMEDATE will change the name of a given file to include the date. For example, a file name somefile.ext will be renamed to somefile 02-Jul-2003.ext when NAMEDATE somefile.ext is run.

Installing NAMEDATE

NAMEDATE is a single Win32 character-mode executable. It does not require any additional .DLLs or other files, but will only run in a Windows "DOS-Box" (Command Prompt).

To install NAMEDATE:

  1. Download the NAMEDATE.ZIP file from
    NameDate Download (Basel, Switzerland)
    NameDate Download (Berlin, Germany)
    Version 6.00
    08. September 2007
    42 Kb Freeware
    US$ 0.00
  2. Use PKUNZIP, WinZIP or some other ZIP utility to extract the contents of the ZIP file.

It is recommended to put the NAMEDATE.exe file in a directory that is contained in the PATH, e.g. C:\Windows\Command on Windows 9x/Me, or C:\WinNT\System32 (or C:\Windows\System32) on Windows NT/2000/XP.

Using NAMEDATE

Usage: NAMEDATE [switches] filename.ext

where switches may be

/Fput the date before the original filename 
/Xput the date as an extension to the original filename 
/Z:"format"specify the date/time format (see below) 
/ZZ:"format"specify the format of the whole name (see below)new in v5.0
/E:"language"specify the language for /Z conversions (ANSI format) (see below)new in v6.0
/EE:"language"specify the language for /Z conversions (ASCII format) (see below)new in v6.0
/8renames the file to a DOS-compatible 8.3 filename (xxyymmdd.ext) 
/Muse the file's modification date/time instead of the current time 
/O+d
/O-d
add or subtract d days to/from the date 
/A+m
/A-m
add or subtract m minutes to/from the time 
/Uconvert any spaces in the filename to underscores 
/Drename directories as well as files (don't use together with /C) 
/Hrename SYSTEM and HIDDEN files 
/Ccopy files instead of renaming them 
/Lfile extension begins with the LAST period in the namenew in v5.2
/Kforce operations (kill any existing target files) 
/S:"path"move or copy the file into the directory path 
/B:numspecify how many files can be renamed in a single directorynew in v5.0
/Qquiet operation - no information message will be displayed 
/Yanswer 'yes' to all confirmation questionsnew in v5.0
Legacy Switches
/Nuses the numeric date form (02-07-2003)same as /Z:"d-m-Y"
/Ruses the reverse numeric date form (2003-07-02)same as /Z:"Y-m-d"
/Tadds the time the date (2003-07-02-17-27)same as adding "-H-M" to the /Z format string

and where filename.ext

is the name of an existing file. The filename.ext may contain a drive letter, a directory name and wildcards, so it's possible to rename all of the files in a given directory.

"format" characters used by the /Z option

aAbbreviated weekday name
AFull weekday name
bAbbreviated month name
BFull month name
dDay of month as decimal number (01-31)
HHour in 24-hour format (00-23)
IHour in 12-hour format (01-12)
jDay of year as decimal number (001-366)
mMonth as decimal number (01-12)
MMinute as decimal number (00-59)
pCurrent locale’s A.M./P.M. indicator for 12-hour clock
SSecond as decimal number (00-59)
UWeek of year as decimal number, with Sunday as first day of week (00-53)
wWeekday as decimal number (0-6; Sunday is 0)
WWeek of year as decimal number, with Monday as first day of week (00-53)
yYear without century, as decimal number (00-99)
YYear with century, as decimal number
zTime-zone name or abbreviation; no characters if time zone is unknown
ZSame as z
\Accept the following character as text instead of a formatting command
Additional Options when /ZZ is used:
FThe original filename (without the extension)
XThe original file extension (without the leading dot)
CA 4-digit counter
cA 2-digit counter

"language" options used by the /E and /EE options

/E specifies the language to use when using /Z or /ZZ with the a, A, b, and B keys. /E specifies that the conversion will use ANSI characters (Windows character set), while /EE specifies that the conversion should use ASCII (DOS) characters. See the examples below for more clarity. For a complete list of languages, please see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_language_strings.asp

Version Information

New in version 6.00 (8. Sept 2007):

New in version 5.21 (26. May 2007):

New in version 5.2 (24. May 2007):

New in version 5.1 (24. Nov. 2006):

New in version 5.04 (23. Nov. 2005):

New in version 5.03 (8. Feb. 2005):

New in version 5.01:

New in version 5.0:

New in version 4.1:

New in version 4.01:

New in version 4.0:

New in version 3.2:

New in version 3.1:

New in version 3.0:

Examples

In all of the examples below, the current date is 1. July 2003 at 5:56pm. The file "sample.txt" has a timestamp of 30. June 2003 at 10:23am.

  1. NAMEDATE "sample.txt"
    Renames "sample.txt" to "sample 01-Jul-2003.txt"
     
  2. NAMEDATE /F "sample.txt"
    Renames "sample.txt" to "01-Jul-2003 sample.txt". This option is best used together with the /R or /Z:"Y-m-d" commands to make sorting the directory listing easier.
     
  3. NAMEDATE /X "sample.txt"
    Renames "sample.txt" to "sample.01-Jul-2003.txt".
     
  4. NAMEDATE /XZ:"Ymd" "sample.txt"
    Demonstrates the use of the new /Z; command. Renames "sample.txt" to "sample.20030701.txt".
     
  5. NAMEDATE /Z:"Y-m-d H-M-S" "sample.txt"
    Another example of the /Z: command. Renames "sample.txt" to "sample 2003-07-01 17-56-39.txt".
     
  6. NAMEDATE /Z:"Y-m-d \at I.M.S p" "sample.txt"
    Yet another example of the /Z: command. Renames "sample.txt" to "sample 2003-07-01 at 05.56.39 PM.txt". Note that the 'a' in ' \at ' is preceeded with a backslash to prevent it from being interpreted as "abbreviated day of the week".
     
  7. NAMEDATE /MZ:"cre\ate\d Y-m-d \at I.M.S p" "sample.txt"
    A complex example of the /Z: command, combined with the /M option. Renames "sample.txt" to "sample created 2003-06-30 at 10-23-44 AM.txt". The 'a' and 'd' commands have to be escaped with backslashes, and the /M command tells NAMEDATE to use the file's date instead of the current date.
     
  8. NAMEDATE /O+3 /MZ:"Y-m-d" "sample.txt"
    Demonstrates the /O command that adds or subtracts a given number of days from the date. In this case, it starts with the file's date, since the /M command was specified. Renames "sample.txt" to "sample 2003-07-03.txt".
     
  9. NAMEDATE /A-90 /MZ:"Y-m-d-H-M" "sample.txt"
    Demonstrates the /A command that adds or subtracts a given number of minutes from the time, again starting with the file's modification time since /M was specified. Renames "sample.txt" to "sample 2003-07-03-8-53.txt"
     
  10. NAMEDATE /U "sample.txt"
    Demonstrates the /U command that converts any spaces in the filename to underscores. Renames "sample.txt" to "sample_01-Jul-2003.txt"
     
  11. NAMEDATE /C "sample.txt"
    Demonstrates the /C command that copies the file instead of renmaing it. This example copies "sample.txt" to "sample 01-Jul-2003.txt"
     
  12. NAMEDATE /8 "sample.txt"
    Demonstrates the new /8 command that renames the file using the DOS-compatible 8.3 limitations. This example renames "sample.txt" to "AA030701.txt"
     
  13. NAMEDATE /S:"C:\Backup" "sample.txt"
    Demonstrates the new /S: command that puts the renamed (or copied, when used together with the /C command) file in a different folder. This example renames "sample.txt" to "C:\Backup\sample 01-Jul-2003.txt"
     

Known Issues and Limitations

Support


NAMEDATE Version 6.00 (08. September 2007)
Copyright (c) 1999, 2002, 2003, 2004, 2005, 2006, 2007 by James Greene. All rights reserved.
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 the address below.

Please report any bugs to .

Source Code availability

The C source code for NAMEDATE is included in the download archive. NAMEDATE was developed in ANSI C, and compiled with Microsoft Visual Studio .NET.

Back to the Shareware Overview


This page was last updated on Saturday, 08. September 2007.

Copyright © James Greene. All rights reserved.
Information in this document is subject to change without notice.
Please send any questions or comments about this page to .

Any product names or trademarks mentioned are property of their respective owners. All rights respected.