DocuFreezer lets you customize how output files are named during document conversion. You can adjust the default output name in several ways:
- Keep it as is (no changes)
- Use your own custom text
- Use built-in macros to pull data from the source file's metadata
- Combine text and macros
This article shows you how to rename files, add page or worksheet numbers, and use advanced customization such as adding leading zeros for consistent file naming.
Contents
- Adjusting file names with the Output filename template setting
- Using macros to change filename
- Adding the email delivery date to output filenames
- Adding leading zeros to source file page numbers when splitting a document
- Adding Bates numbering to output filenames
- Naming of combined PDF or TIFF files
- Didn't find your desired naming format?
Adjusting file names with the Output filename template setting
You can freely modify the output file name template by entering your own text or adding characters such as dots, dashes, underscores, and more.
Important: Avoid using the following characters, as they are prohibited in Windows filenames:
< (less than)
> (greater than)
: (colon)
" (double quote)
/ (forward slash)
\ (backslash)
| (vertical bar)
? (question mark)
* (asterisk)
This restriction does not apply to macros — macros may contain any characters.
To modify the output naming pattern, open DocuFreezer Settings → Advanced and find the Output filename template setting:

Here you can use your custom text and/or macros. For example, macro {*SrcFilename} inserts the original source file name. By default, DocuFreezer uses the following template for output filenames:
{*SrcFilename}{*WorksheetName}{*SrcFileMPageNo}.{*DstFileExt}
- {*SrcFilename} – stands for source file name;
- {*WorksheetName} – stands for worksheet file name (usually applicable for Excel or CAD files);
- {*SrcFileMPageNo} – stands for source file page number ("M" implies "multiple pages", hence this macro avoids adding page number "1" to single-page files);
- {*DstFileExt} – stands for destination file extension.
This template combines the source filename, worksheet name (if applicable), page number, and destination file extension. You can adjust this template to suit your needs.
Using macros to change filename
To access built-in macros, click the {=} icon in the DocuFreezer Settings. A macro is a value or expression that pulls data from the metadata of the source file. This data can include the filename, file path, file attributes (such as creation date and time), or other details like the computer's or user’s name. Most macros extract information directly from the source file’s metadata. If the data is missing in the source file, it will be omitted.

Insert macros via the {=} icon or type them manually. If entered correctly, the macro name will turn light green. You can combine macros with your own text, including spaces, dots, or other characters, to create a custom naming pattern.
Note: Macro names are not case-sensitive, so {*dstfileext} and {*DstFileExt} will function identically.
List of available macros for Output filename template and Attached filename template
| Macro name | Macro | Description |
|---|---|---|
| Regular expression of original file name | ||
| Take digits from the beginning | {*SrcFileName("^(\d+)")} | Extracts digits from the beginning of the source filename. For example, 12345_Invoice returns 12345. |
| Take digits from the end | {*SrcFileName("(\d+)$")} | Extracts digits from the end of the source filename. For example, Invoice_12345 returns 12345. |
| Take any first 10 symbols | {*SrcFileName("^(.{1,10})")} | Extracts the first 10 characters of the source filename. |
| Take any symbols after dash | {*SrcFileName("-(.*)")} | Extracts the part of the source filename after a dash (-). |
| Cut "quick brown fox" from filename | {*SrcFileName("(.*)quick brown fox(.*)")} | Removes the text quick brown fox from the source filename. |
| Cut one character | {*SrcFileName("^.{1}(.*?)$")} | Removes the first character from the source filename. |
| Filename | ||
| Source file name | {*SrcFileName} | Inserts the source filename without its extension. For example, Invoice.pdf returns Invoice. |
| Source file extension | {*SrcFileExt} | Inserts the source file’s extension without the dot, such as docx or pdf. |
| Source file type | {*SrcFileType} | Inserts the source file’s type, such as Microsoft Office Word. |
| Source file path, 1-st part | {*SrcFileFullpath(1)} | Inserts the first part of the source file’s path, excluding the drive letter. For C:\Projects\Client_A\Invoices\Invoice.pdf, this is Projects. |
| Source file path, 2-nd part | {*SrcFileFullpath(2)} | Inserts the second part of the source file’s path, excluding the drive letter. For C:\Projects\Client_A\Invoices\Invoice.pdf, this is Client_A. |
| Source file path, 3-rd part | {*SrcFileFullpath(3)} | Inserts the third part of the source file’s path, excluding the drive letter. For C:\Projects\Client_A\Invoices\Invoice.pdf, this is Invoices. |
| Destination file extension | {*DstFileExt} | Inserts the extension for the selected output format, such as pdf, png, or tiff. |
| Worksheet name | {*WorksheetName} | Inserts the name of the worksheet being processed, where applicable—for example, when converting Excel spreadsheets or CAD drawings. |
| Container name | {*ContainerName} | Inserts the name of the file containing the document, such as an email message, ZIP archive, or PDF Portfolio. |
| Date/Time | ||
| Date (Full format) | {*Date(M-d-yyyy)} | Inserts the current date, including the year, month, and day. |
| Year | {*Date(yyyy)} | Inserts the year from the current date. |
| Month | {*Date(MM)} | Inserts the month from the current date. |
| Day | {*Date(dd)} | Inserts the day of the month from the current date. |
| Time (Full format) | {*Time(h-mm-ss tt)} | Inserts the current time, including hours, minutes, and seconds. |
| Hour | {*Time(HH)} | Inserts the hour component of the current time. |
| Minute | {*Time(mm)} | Inserts the minute component of the current time. |
| Second | {*Time(ss)} | Inserts the second component of the current time. |
| Millisecond | {*Time(ms)} | Inserts the millisecond component of the current time. |
| Source file last write date | {*SrcFileDate} | Inserts the date when the source file was last modified. |
| Source file last write time | {*SrcFileTime} | Inserts the time when the source file was last modified. |
| Source file creation date | {*SrcFileCreationDate} | Inserts the source file’s creation date. |
| Source file creation time | {*SrcFileCreationTime} | Inserts the source file’s creation time. |
| Miscellaneous | ||
| Common Documents | {*PubDocs} | Inserts the path to the shared Documents folder in Windows. |
| My Documents | {*MyDocs} | Inserts the path to the current user’s Documents folder in Windows. |
| User name | {*User} | Inserts the current Windows user account name. |
| Computer name | {*Computer} | Inserts the Windows computer name. |
| User defined macro | {*Udm} | Inserts a value supplied through a user-defined macro, such as a project identifier, custom prefix, or suffix. |
| Pages | ||
| Source file pages | {SrcFilePages} | Inserts the total number of pages in the source file. |
| Source file page number | {SrcFilePageNo} | Inserts the source page number for the output file. |
| Source file page number, 2 digit number / 01 | {*SrcFileMPageNo(_{0:D2})} | Inserts the source page number with leading zeros to a minimum width of two digits, such as 01 or 09. |
| Source file page number, 3 digit number / 001 | {*SrcFileMPageNo(_{0:D3})} | Inserts the source page number with leading zeros to a minimum width of three digits, such as 001 or 025. |
| Source file page number, 4 digit number / 0001 | {*SrcFileMPageNo(_{0:D4})} | Inserts the source page number with leading zeros to a minimum width of four digits, such as 0001 or 0250. |
| Source file page number, 5 digit number / 00001 | {*SrcFileMPageNo(_{0:D5})} | Inserts the source page number with leading zeros to a minimum width of five digits, such as 00001 or 02500. |
| Source file page number, 6 digit number / 000001 | {*SrcFileMPageNo(_{0:D6})} | Inserts the source page number with leading zeros to a minimum width of six digits, such as 000001 or 025000. |
| Item # in list | {ListItemNo} | Inserts the source item’s position in the List of Documents. |
| Items in list | {ListItems} | Inserts the total number of items in the List of Documents. |
| Delivery time | {*MsgDeliveryTime} | Inserts the email message’s delivery timestamp. Note: You can change this macro's date and time format, for example: {*MsgDeliveryTime(yyyy.MM.dd)} {*MsgDeliveryTime(h-mm-ss tt)} |
| Sender address | {*MsgFromAddress} | Inserts the sender’s email address. |
| Sender name | {*MsgFromName} | Inserts the sender’s name. |
| Recipient address | {*MsgToAddress} | Inserts the recipient’s email address. |
| Recipient name | {*MsgToName} | Inserts the recipient’s name. |
| Subject | {*MsgSubject} | Inserts the email message’s subject. |
Adding the email delivery date to output filenames
When converting email messages, such as MSG or EML files, you can include each message’s delivery date, subject, and other email details in the output filename:
{*MsgDeliveryTime(yyyy-MM-dd)} - {*SrcFilename}.{*DstFileExt}
Example: 2026-09-25 - Delivery confirmation.pdf
The date comes from the source message. This macro cannot retrieve the original email delivery date from a PDF previously created from that message. You can choose the position of email details — for example, place them at the beginning or end of the output filename. This helps you organize converted messages chronologically.
For step-by-step instructions, troubleshooting, and practical naming examples, see Add email details to output filenames.
Adding leading zeros to source file page numbers when splitting a document
When DocuFreezer processes a document and splits it into multiple pages or worksheets (e.g., saved as image files), it adds numerical endings to the filenames. This prevents files with the same name from being overwritten. Examples include:
- A multi-page PDF gets split into separate images (JPG, PNG, TIFF).
- An Excel file with multiple worksheets converted into an image format (JPG, PNG, TIFF).
- A PDF split into single pages during conversion.
If the number of pages is 10 or fewer, files will be named file-1.pdf, file-2.pdf, file-3.pdf, and so on. For 11 to 100 pages, the naming shifts to file-01.pdf, file-02.pdf, file-03.pdf, up to file-100.pdf. You can customize this further by adding more digit positions and leading zeros. For instance, you can change the naming from Document-2 to Document-000002.
To adjust this in DocuFreezer:
- Open the Settings panel → Advanced.
- Next to Output filename template, remove the default macro {*SrcFileMPageNo}.
- Click the {=} icon, navigate to Pages, and select Source file page number, 3-digit number / 001 (or another desired option). The Output filename template will be:
{*SrcFilename}{*WorksheetName}{*SrcFileMPageNo(_{0:D3})}.{*DstFileExt} - Save the settings and test the configuration with a few files.

After conversion, your output files should reflect the updated naming with three-digit numbers (e.g., Document-001, Document-002).
You can further tweak the {*SrcFileMPageNo(_{0:D3})} macro to fit your preferences. For example:
- Replace the underscore (_) with a dash (-) to get names like "A nine-page document-001.png".
- Adjust the number of leading zeros by changing D3 to D2, D4, D5, or D6 (e.g., D4 yields Document-0001).
Test your configuration with a small batch of files to ensure the naming meets your requirements. With DocuFreezer’s flexible naming options, you can streamline file organization and maintain consistency across your converted documents.
Adding Bates numbering to output filenames
DocuFreezer can both add Bates numbers in the form of a Text watermark, similar to page numbers and implement them in the output filenames. Bates number typically adds a file identifier in uppercase letters and a sequential page number starting from the last processed document.
For more details, please refer to this article:
How to Add Bates Numbering to PDF Files in DocuFreezer
Naming of combined PDF or TIFF files
When creating a multipage PDF document or TIFF image, you can control the output filename through the Combined file setting. Since multiple files are usually merged, there should be a user-specified name for the output file. While the default name is "Combined.pdf" (or "Combined.tiff"), you can change it to any name you prefer and use macros if necessary (for example, add User name {User} or Computer name {Computer} to the output filename).

Didn't find your desired naming format?
If you need a specific naming pattern that was not covered in this article, please don't hesitate to contact our developers directly for a custom solution.
You may also like to read:
How to Add Bates Numbering to PDF Pages and Filenames in DocuFreezer