Incode Systems Home Page Incode Systems, Inc.


NAMEFILE



(Windows 95 or higher command line utility)

NameFile - Copyright (C) 2004-2012, Incode Systems, Inc.
Version 1.1.0
www.incodesystems.com
sales1Usage: [options] FileName FileMask
Where: FileMask is a string containing escape sequences surrounded by and YMD in the mask are replaced with the year, month, and day,
If YY is used for a 2 digit year, YYYY for a 4 digit year.
D-nonpadded day, DD-zero padded day, DDD-Sun,Mon,etc. DDDD-Monday
HNS in the mask are replaced with the hour, minute, and second.
am/pm is replaced with am or pm, or a/p is replaced with a or p
Surround replacement character with single quotes to escape replacement.
# signs are replaced with a serial number.
in FileMask is replaced with the original file name, without
the path or extension. is replaced with the original extension.

If FileName or FileMask contains spaces, surround with double quotes.
Directories may be renamed as well as files.
If FileMask does not include a path, FileName is renamed in the directory
where it exists. If FileMask includes a path on the same drive as FileName,
the path is created, if necessary, and FileName is renamed to the path.
The "/" character in FileMask is replaced with "-".
FileName may contain wildcards (*,?).
The fully qualified original and new file names are written to standard output

Options:
-bn Output new bare file name only (no drive or path), original name not output
-n Output new file name only, original name not output
-o Overwrite. File is overwritten if file already exists
(directories are not overwritten).
-ft Use File date and time instead of current date and time.
-+n Number of days to add to date.
Examples: -+1 for tomorrow. -+-1 for yesterday.
-unc Use UNC name for files not on a local drive.

ERRORLEVEL is 0 if rename succeeds, or the following on error:
1 = File not found.
2 = Delete of existing file failed.
3 = Rename failed.
4 = Invalid FileMask.

Example: NameFile TempFile.txt The command line above executed on 1/1/2004 at 1:30pm will name the file
TempFile.txt to 20040101_1330.txt

NameFile - Copyright (C) 2004-2012, Incode Systems, Inc.
Version 1.1.0
www.incodesystems.com
sales1To view entire usage, type: NameFile /? | More