Technical Note: 20050331041

Export File Rename Utility

(Maitre'D 2005 and later versions of Maitre'D)
A console command line application can rename an export file to include a time-stamp based on the Maitre'D accounting date, the restaurant's ID and/or the current time.
Use the MDRename.exe application as follows:

MDRename [/D] [/T] [/R] [path] Filename1 [Filename2]

Filename1: Specify the file to rename
Filename2: Specify the new name of the file
/D:   Append Accounting Date to file name
/T:   Append Current Time to file name
/R:   Append Restaurant ID to file name

If no switch is specified, the /D switch is applied by default.

Examples:

Input: MDRename C:\test\CloseDet.txt
Output: C:\test\CloseDet_YYYYMMDD.txt

 

Input: MDRename C:\test\CloseDet.txt export.csv
Output: C:\test\export_YYYYMMDD.csv

 

Input: MDRename /D C:\test\CloseDet.txt
Output: C:\test\CloseDet_YYYYMMDD.txt

 

Input: MDRename /T C:\test\CloseDet.txt
Output: C:\test\CloseDet_HHMMSScc.txt

 

Input: MDRename /D /T C:\test\closeDet.txt
Output: C:\test\CloseDet_YYYYMMDD_HHMMSScc.txt

 

Input: MDRename /D /T /R C:\test\closeDet.txt export.csv
Output: C:\test\export_YYYYMMDD_HHMMSScc_RRRR.csv

Note: The application first searches the current folder to find the needed file. If it does not find it, it looks in the registry to locate the data folder.