Informatics Consulting > Software > NameDate

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

NAMEDATE: Add the date to a given filename

Version 6.14
Copyright (c) 1999, 2002-2007, 2009, 2014, 2015


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


NAMEDATE is a 32-bit command line utility for Windows 2000/XP/7/8. 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 05-Jan-2015.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 file from
    NameDate Download (Basel, Switzerland)
    NameDate Download (Berlin, Germany)
    Version 6.14
    06. January 2015
    70 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 variable, or add the directory where NAMEDATE.EXE is stored to the PATH.


Usage: NAMEDATE [switches] filename.ext

where switches may be

Name Formatting switches
/Z:"format"specify the date/time format (see below) 
/ZZ:"format"specify the format of the whole name (see below)added 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
/Uconvert any spaces in the filename to underscores 
/Lfile extension begins with the LAST period in the nameadded in v5.2
Date/Time switches
/Muse the file's modification date/time instead of the current time 
/OY|M|D[+|-]nadd or subtract n Years/Months/Days to/from the datechanged in v6.10
/AH|M|S[+|-]nadd or subtract n Hours/Minutes/Seconds to/from the timechanged in v6.10
General program switches
/Ccopy files instead of renaming them 
/Drename directories as well as files (don't use together with /C) 
/Hrename SYSTEM and HIDDEN files 
/Kforce operations (replace any existing target files) 
/KKKill any existing target directories (when used together with /D).new in v6.02
/S:"path"move or copy the file into the directory path 
/SM:"path"move files across drives into the directory path. The /SM flag implies the /C in v6.13
/B:numspecify how many files can be renamed in a single directoryadded in v5.0
/BDdetermine the number of files automaticallynew in v6.12
/Qquiet operation - no information message will be displayed 
/Yanswer 'yes' to all confirmation questionsadded in v5.0
/P(Pretend) Simulates the rename action (for debugging purposes)new in v6.12
/Vdisplays the NAMEDATE version and license informationnew in v6.10
/?displays the list of switches 
Legacy switches
/Fput the date before the original filename 
/Xput the date as an extension to the original filename 
/8renames the file to a DOS-compatible 8.3 filename (xxyymmdd.ext) 
/Nuses the numeric date form (02-07-2014)same as /Z:"d-m-Y"
/Ruses the reverse numeric date form (2014-07-02)same as /Z:"Y-m-d"
/Tadds the time the date (2014-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 MSDN Language Reference

Version Information

New in version 6.14 (6. Jan 2015)

New in version 6.13 (5. Jan 2015)

New in version 6.12 (4. Jan 2015):

New in version 6.11 (2. May 2014):

New in version 6.10 (24. June 2009):

New in version 6.02 (19. June 2009):

New in version 6.00 (8. Sept 2007):

For earlier releases, please consult the CHANGE_LOG.txt file included in the download package.


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

  1. NAMEDATE "sample.txt"
    Renames "sample.txt" to "sample 01-Jul-2014.txt"
  2. NAMEDATE /F "sample.txt"
    Renames "sample.txt" to "01-Jul-2014 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-2014.txt".
  4. NAMEDATE /XZ:"Ymd" "sample.txt"
    Demonstrates the use of the new /Z; command. Renames "sample.txt" to "sample.20140701.txt".
  5. NAMEDATE /Z:"Y-m-d H-M-S" "sample.txt"
    Another example of the /Z: command. Renames "sample.txt" to "sample 2014-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 2014-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 2014-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 /OD+3 /MZ:"Y-m-d" "sample.txt"
    Demonstrates the /O command that adds or subtracts a given number of years/months/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 2014-07-03.txt".
  9. NAMEDATE /AH-1 /AM-30 /MZ:"Y-m-d-H-M" "sample.txt"
    Demonstrates the /A command that adds or subtracts a given number of hours/minutes/seconds from the time, again starting with the file's modification time since /M was specified. In this example, the first /A command subtracts one hour, and the second subtracts another 30 minutes. (This could have also been written as /AM-90 to subtract 90 minutes). Renames "sample.txt" to "sample 2014-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-2014.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-2014.txt"
  12. NAMEDATE /8 "sample.txt"
    Demonstrates the /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 /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-2014.txt"
  14. NAMEDATE /MS:"D:\Backup" "C:\Source\sample.*"
    Demonstrates the new /SM: command that moves (copies under a new name, then deletes the original file) the selected file(s) . This example renames any files matching "sample.???" to "D:\Backup\sample 01-Jul-2014.ext"

Known Issues and Limitations


NAMEDATE Version 6.14 (06. January 2015)
Copyright (c) 1999, 2002-2007, 2009, 2014, 2015 by James Greene. All rights reserved.

This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program (COPYING.TXT), or see .
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 the MinGW compiler.

	gcc (GCC) 4.8.1
	Copyright (C) 2013 Free Software Foundation, Inc.

To build NAMEDATE, just expand the source archive and enter the command
mingw32-make clean all

Links and Awards

Back to the Shareware Overview

This page was last updated on Saturday, 12. March 2016.

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.