Printer Version Table of Contents Project Home Page
.EXAMPLE.....: 83 Rename a file to a name that contains today's date in only 3 bytes
.CATEGORY....: examples
It is possible to store information about a date in only 3 bytes, using "extended hex" format.

If you need to store a date in a filename, but are really limited in the number of bytes available, here is how to do it.

For more information about the extended hex output format ("/Oxxx"), see PARAMETER /Oxxx - Extended Hex Output Date Format

:: get today's date in extended hex format
FDATE /Ff /Oxxx /p"SET XXX=">junk.bat
call junk.bat
del  junk.bat

:: rename a file, using the xxx date

:: cleanup