Create File or Folder from Template Rule

The Create Folder dialog (F7) and the New File dialog (Shift+F4) both support dynamic naming through template rules. A template rule starts with : or < and is expanded using date/time, reference file properties, counters, clipboard content, and more — with a live preview before anything is created. Without a template prefix the name is used literally, so all classic creation modes (nested paths, semicolon-separated multiple folders) continue to work unchanged.

Dynamic Naming for Files and Folders

Template rules transform static dialogs into powerful creation tools — stamp files with today's date, mirror the name of a selected reference file, insert the current username or clipboard content, generate sequentially numbered series, or combine any of these in one rule. Rules are live-previewed before creation so you always see what will be created.

Overview and Activation

Template rules are entered wherever a filename or folder name is requested. The rule starts with a special prefix character that activates template expansion. Without this prefix the text is used verbatim as the name.

New File — Shift+F4
How to Use
  • Open Dialog: Press Shift+F4 in the Explorer Panel
  • Enter Rule: Type a template rule starting with : in the filename field
  • Live Preview: The dialog shows the expanded name(s) in real time
  • Multiple Files: Use a range or count block to create several files at once
Example
  • :Notes_[YMD].txtNotes_20260626.txt
  • :<1-5>Report_[C2].txt → five files Report_01.txtReport_05.txt
Create Folder — F7
Opening the Dialog
  • F7 — open Create Folder dialog from the Explorer Panel
  • Shift+F7 — open with clipboard text pre-filled
  • Tools → Create Folder — menu access
  • Toolbar icon — click, or right-click for quick date-pattern presets
With Template Rule
  • Enter Rule: Type a template rule starting with : in the folder name field
  • Live Preview: The dialog shows the expanded name(s) in real time
  • :Project_[u]_[YMD]Project_Alice_20260626
  • :<1-4>Quarter_[Ca]Quarter_a, Quarter_b, Quarter_c, Quarter_d
Literal and Classic Modes

When the name does not start with : or <, it is used literally — no tag expansion occurs. All classic creation methods still work:

Nested Path Creation
  • Enter a backslash-separated path to create an entire hierarchy in one step
  • Projects\WebApp\Source — creates three nested folders
  • Archive\2026\January\Reports — creates a four-level structure
Semicolon-Separated Multiple Folders
  • Separate names with ; to create several folders at the same level simultaneously
  • Inbox;In Progress;Done;Archive — creates four folders at once
  • Source;Build;Deploy;Test — four dev folders in one step
  • Works as long as no name starts with : or <
In-Dialog Keyboard Shortcuts

These shortcuts work while the Create Folder dialog is open:

KeyAction
Shift+F7Open dialog with clipboard text pre-filled
F5Insert clipboard text at cursor position
F8Remove all dots (periods) from the name field
F9Insert today's date as YYYY-MM-DD
Shift+F9Append today's date to existing text
Toolbar Quick Patterns

Right-click the Create Folder toolbar icon to instantly create a folder named with a preset date format: YYYY-MM-DD, YYYY-MM, DD-MM-YYYY, MM-DD-YYYY, and more.

Template Activation Rules
First character Behaviour
: (colon) Template mode — all [tag] blocks inside are expanded
< (less-than) Template mode with a leading multiple-item block (range or count)
Any other character Literal mode — name used exactly as typed, no tag expansion
Combined tag blocks

Multiple single-letter tags can share one [...] block and are processed left-to-right. For example [YMD] expands to year+month+day. Multi-character tags ([WD], [WDN], [WDL], [WDNL], [dl], [tl], [fY][fd], [I1][I9]) must each have their own [...] block.

Tag Reference

All tags are enclosed in square brackets [tag]. Tags are case-sensitive. The table below lists every supported tag; slice syntax and case mode that apply to a tag are noted in its description.

Date and Time Tags

All individual date/time tags produce zero-padded digit strings. Case mode does not apply to digit output.

Tag Value Notes
[Y]Year — 4 digitsExample: 2026
[M]Month — 2 digits, 01–12
[D]Day — 2 digits, 01–31
[H]Hour — 2 digits, 00–2324-hour clock
[m]Minute — 2 digits, 00–59Lowercase m
[S]Second — 2 digits, 00–59Uppercase S
[d]ISO date YYYY-MM-DDComposite; no slice. Example: 2026-05-14
[t]ISO time HH-MM-SSComposite; no slice. Example: 14-30-05
[W]ISO week number — 2 digits, 01–53Bypasses case mode
Combined date example

[YMD] is shorthand for [Y][M][D]20260626. You can write [YMD] or [Y][M][D]; the combined form is more compact.

Weekday Tags
TagValue
[WD]Abbreviated English weekday: Sun, MonSat
[WDN]Full English weekday: Sunday, Monday
[WDL]Abbreviated weekday in OS locale language
[WDNL]Full weekday name in OS locale language
  • [WD] and [WDN] support case mode; no slice
  • [WDL] and [WDNL] support case mode and slice; illegal filename characters replaced with space
  • Each must occupy its own [...] block
Localized Date / Time
TagValue
[dl]Short date string from OS regional settings
[tl]Time string from OS regional settings
  • Both support case mode and slice
  • Illegal filename characters (\ / : * ? " < > |) are replaced with a space
  • Example (Swedish locale): [dl]2026-05-13, [tl]23 22 29
  • Each must occupy its own [...] block
Reference Item Tags

When an item is focused in the Explorer Panel when the dialog opens, these tags draw from its filename and path. All support slice syntax and case mode.

TagValue
[N]Focused filename without extension
[E]Focused file extension without leading dot
[P] / [P1]Immediate parent folder name
[P2][P9]N levels up from the file (P2 = grandparent, P3 = great-grandparent, …)
[P+0][P+9]N-th path component from the drive root (0-based, item itself excluded). [P+0] = drive letter (no colon)
[G]Grandparent folder name — legacy alias for [P2]
[T]File tag names, comma-separated (empty if no tags or no focused item)
[cm]File comment; line breaks and illegal filename characters replaced with spaces
Reference File Date Tags

Use the write time of the focused file instead of today's date. Each tag must have its own [...] block.

TagValue
[fY]File write year (4 digits)
[fM]File write month (2 digits)
[fD]File write day (2 digits)
[fH]File write hour (2 digits)
[fm]File write minute (2 digits)
[fS]File write second (2 digits)
[fW]File write ISO week number (2 digits)
[fd]File write weekday abbreviated in English — case mode applied
System and GUID Tags
TagValue
[u]Windows username. Slice and case mode applied.
[V]Clipboard text (CF_UNICODETEXT). Slice and case mode applied. Illegal filename characters and control characters replaced with a space. Capped at 1024 characters. Empty if clipboard is unavailable.
[gu]First 8 hex digits of a freshly generated GUID (lowercase by default). Slice and case mode applied. Example: a3f9c10b
Case Mode Tags
TagEffect (persistent)
[U]Uppercase all subsequent text output
[L]Lowercase all subsequent text output
[F]Title case — first letter of each word uppercased
[n]Reset — cancel [U], [L], [F]

Case mode does not apply to digit-only tag output (dates, counters, etc.).

Counter Tags

Counter tags are only meaningful when a multiple-item block (<A-B> or <N>) is present. They bypass case mode.

TagValue (range/count mode)
[C]Current integer, no padding
[C2][C9]Current integer zero-padded to N digits. [C3]001, 002, …
[Ca]Lowercase alpha counter (a=0, b=1, …, z=25, wraps)
[CA]Uppercase alpha counter (A=0, B=1, …, Z=25, wraps)
[C,item1,item2,…]Count mode only — cycles through listed items (case mode applied)

Creating Multiple Items at Once

A single template rule can generate several files or folders simultaneously by including a multiple-item block. Only one such block is allowed per rule, and the appropriate counter tag ([C], [C2][C9], [Ca], [CA], or [C,…]) must appear somewhere in the rule.

Range Mode <A-B>

Creates B−A+1 items. The counter runs from A to B (inclusive).

RuleItems created
:<1-3>Report_[C]Report_1, Report_2, Report_3
:<1-5>Week_[C2]Week_01Week_05
:<10-12>Q[C]_[YMD]Q10_20260626, Q11_20260626, Q12_20260626
:<0-3>Phase_[Ca]Phase_a, Phase_b, Phase_c, Phase_d
Count Mode <N>

Creates N items. The counter runs 0 to N−1. Use with the list form [C,item1,item2,…] to cycle through a predefined set of values.

RuleItems created
:<4>Task_[C,Alpha,Beta,Gamma,Delta]Task_Alpha, Task_Beta, Task_Gamma, Task_Delta
:<3>Draft_[C2]Draft_00, Draft_01, Draft_02

Slice Syntax and Escape Sequences

Tags that support slice syntax let you extract a portion of the tag output. The slice spec is written inside the same [...] block immediately after the tag letter(s). Positions are 1-based.

Slice Specification
Syntax Meaning Example on "MyFile"
[N,s] From position s (1-based) to end [N,3]File
[N,s,len] From s, take at most len characters [N,3,2]Fi
[N,s-e] From s to e (1-based, inclusive) [N,3-6]File

Positions beyond the string length are clamped silently. Case mode is applied after slicing. Slice is supported by: N, E, P/P1P9/P+0P+9, G, T, cm, u, V, gu, WDL, WDNL, dl, tl, I1I9.

Escape Sequences

To include a literal bracket character in the output, use these escape sequences (processed outside tag blocks):

SequenceOutput
[[Literal [
]]Literal ]
Input String Tags

When the dialog prompts for additional input values, those strings are available as [I1][I9].

  • [I1] — first input string provided
  • [I2][I9] — subsequent input strings
  • All support case mode and slice syntax
  • Empty if N exceeds the number of provided strings

MultiScript Integration

Template rules can be used from MultiScript to create files and folders programmatically — applying the same dynamic tag expansion available in the dialogs.

MakeDir with Template Rule

Pass a template rule as the path argument. When the rule starts with : or <, MakeDir expands it instead of using it as a literal path. A range block creates multiple folders in a single call.

// Single folder named with today's date
MakeDir( ":Reports_[YMD]", "LOCAL" );

// Five weekly folders created at once
MakeDir( ":<1-5>Week_[C2]", "LOCAL" );

// Folder named after current user and date
MakeDir( ":Workspace_[u]_[YMD]", "LOCAL" );
MakeDir Signature
<num> MakeDir( <str> pathOrRule, <str> options );
  • pathOrRule: A literal folder path or a template rule (starts with : or <)
  • options: "LOCAL", "RECURSIVE" (same as before)
  • Return: 0 for success, else error code

See MakeDir in the filesystem functions reference.

CreateFileFromTemplate

Creates one or more new empty files in a target folder using a template rule. A range block in the rule creates multiple files in a single call.

// Single file named with today's date
CreateFileFromTemplate( "C:\\Work\\", ":Notes_[YMD].txt" );

// Three numbered draft files
CreateFileFromTemplate( "C:\\Work\\", ":<1-3>Draft_[C2].md" );

// File named after focused/reference item + date
CreateFileFromTemplate( "C:\\Archive\\", ":Backup_[N]_[YMD].[E]" );
CreateFileFromTemplate Signature
<num> CreateFileFromTemplate( <str> targetFolder, <str> rule, [<str> options] );
ParameterDescription
targetFolder Full path to the folder where the file(s) will be created
rule Template rule string. Must start with : or < for expansion; otherwise used as a literal filename
options Optional. Reserved for future options

Return value: Number of files successfully created, or 0 on failure.

Examples

The following examples show typical template rules for both files and folders, demonstrating how tags can be combined to produce useful dynamic names.

Rule Examples
Rule Sample output
:Notes_[YMD].txt Notes_20260626.txt
:Meeting_[Y]-[M]-[D]_[H][m] Meeting_2026-06-26_1430
:[WDN]_Report_[YMD] Friday_Report_20260626
:Project_[u]_[d] Project_alice_2026-06-26
:Backup_[N]_[fY][fM][fD].[E] Backup_report_20260601.pdf (using focused file's write date)
:ID_[gu]_[YMD] ID_a3f9c10b_20260626
:[U][N]_PROCESSED.[E] REPORT_PROCESSED.PDF (focused file name uppercased)
:<1-4>Quarter_Q[C]_[Y] Quarter_Q1_2026, Quarter_Q2_2026, Quarter_Q3_2026, Quarter_Q4_2026
:<1-12>[Y]-[C2] 12 monthly folders: 2026-012026-12
:<3>Sprint_[C,Alpha,Beta,Gamma] Sprint_Alpha, Sprint_Beta, Sprint_Gamma
:[V,1,20]_[YMD] First 20 chars of clipboard + date
Template Rule Mastery

Activate template mode by starting the rule with :. Combine date tags ([YMD], [H][m][S]), reference tags ([N], [E], [P1][P9]), system tags ([u], [V], [gu]), case mode ([U], [L], [F]), and counter tags ([C2], [Ca]) to build powerful dynamic names. Add a range block <A-B> together with a counter tag to create multiple files or folders in a single step. Use slice syntax [N,s,len] to trim tag output to exactly what you need. The live preview in the dialogs shows the expanded names before any items are created.