← Back to Home • Next: MultiFile — Styles →
How the MultiFile control behaves while it is running: keyboard, tree navigation, checking, cascade
and recursive marking, the count range, validation, history, and the values it returns.
Check files or folders: Program.cs 1.2 KB ← prompt + live answer (path + size, follows the cursor)
Space to check, Enter to confirm ← description (optional)
C:\Projects ← root folder
+- ▼ [x] src ← expanded, checked folder
│ › [x] Program.cs 1.2 KB ← focused, checked file + size
│ [ ] Startup.cs 3.4 KB ← unchecked file
+- ▶ [ ] docs ← collapsed folder
+- [x] README.md 0.8 KB
Checked: 3 ← tagged info (count)
Page 1/2 ← pagination
Space: check Enter: confirm Esc: cancel ← tooltip
The live answer shows the size next to the path for a focused file (omitted for folders, and
omitted entirely when HideSize is set), reachable via
Home/End/←/→ scrolling if the path is too long to fit. The final answer after Enter
shows the checked-items summary (paths only, no size).
Every region can be recolored — see Styles.
MultiFile is a lazy tree browser: a folder’s children are read only when you expand it, and
released when you collapse it. Checked entries are tracked by their full path, so a selection
survives collapsing and re-expanding its branch.
| Key | Action |
|---|---|
↑ / ↓ |
Move focus up / down |
+ |
Expand the focused folder (plain → does not expand) |
- |
Collapse the focused folder (plain ← does not collapse) |
Tab |
On a folder: expand it (if needed) and move to its first child. On a file: move to the next item |
Shift+Tab |
On a folder’s first child: collapse the parent and move to it. Otherwise: move to the previous item |
Space |
Check / uncheck (recursive on folders by default — see below) |
Ctrl+Space |
Recursive folder mark, when RecursiveMarkWithCtrlSpace is on |
F2 |
Toggle all (check / uncheck everything currently loaded) |
F3 |
Filter the list to show only checked items; press again to restore the full list |
Page Up / Page Down |
Jump one page |
Ctrl+Home / Ctrl+End |
First / last visible item (plain Home/End instead scroll the long-path answer text — see the anatomy note above) |
Enter |
Confirm the checked entries (subject to the range) |
Esc |
Abort → IsAborted == true |
Shift+F3 |
Toggle the summary between full path and short name |
F1 |
Cycle tooltip content |
Ctrl+F1 |
Show / hide the tooltip |
⚠️ There is no
F4wildcard-select feature —HotKeySelectWildcard/F4 was dead config that has since been removed. UseSpace/Ctrl+Space(above) for recursive folder marking instead.
How Space behaves on a folder depends on two settings:
CascadeCheck |
RecursiveMarkWithCtrlSpace |
Space on a folder |
Ctrl+Space on a folder |
|---|---|---|---|
true (default) |
false (default) |
Recursively checks the folder and everything under it | — |
true |
true |
Toggles only the folder itself | Recursively checks the folder and everything under it |
false |
— | Toggles only the folder itself | — |
CascadeCheck governs whether folder state propagates to descendants.RecursiveMarkWithCtrlSpace moves the recursive action to
Ctrl+Space and keeps plain Space for single-item toggling.On files, Space always toggles just that file.
SearchPattern filters files by wildcard; directories always show.OnlyFolders hides files entirely.SelectFilesOnly lets folders be expanded and browsed but not
checked — only files enter the result.ShowHidden / ShowSystem add Hidden/System
entries; both off by default.Range(min, max?) enforces how many items must be checked:
min items are checked.max is set, checking beyond it is prevented (or reported).max (pass null) for a minimum-only rule.PredicateChecked /
PredicateCheckedAsync decides whether an item may be checked:
The summary shows either each entry’s short name or its full path. ShowFullPath
sets the initial choice; the user can flip it with Shift+F3. This affects only the display —
each FileItem.FullPath always carries the complete path.
Default(fullPaths) pre-checks the given paths and expands the tree to the
first one under the Root.EnableHistory, the confirmed paths are stored on disk; on the
next run they become the defaults and the tree expands to the first.MinPrefixLength, MaxItems, ExpirationTime, FilterType, PageSize) match
the Input history options.FileItem resultsRun() returns ResultPrompt<FileItem[]>. Each FileItem is a sealed class (not
System.IO.FileInfo — there is no FullName):
| Member | Type | Meaning |
|---|---|---|
FullPath |
string |
Full path on disk (ToString() returns this) |
Name |
string |
Display name of the entry |
IsDirectory |
bool |
true for folders |
Length |
long |
Size in bytes; 0 for directories |
LastWriteTime |
DateTime |
Last write timestamp |
var result = PromptPlus.Controls.MultiFile("Check").Root(root).Run();
if (!result.IsAborted)
{
foreach (var f in result.Content)
PromptPlus.Console.WriteLine($"{f.FullPath} (dir: {f.IsDirectory}, size: {f.Length})");
}
Set per instance via Options(...), or globally on
PromptPlus.Config:
| Option | Effect on MultiFile |
|---|---|
EnabledAbortKey(false) |
Removes Esc — the user must confirm |
HideAfterFinish(true) |
Erases the tree after confirm — the whole control is erased, not just the interactive part |
ShowTooltip(false) |
Hides the keyboard hint line |
Prompt(...) / Description(...) |
Overrides the prompt / description text |
PageSize can be set per control (PageSize) or globally
(PromptPlus.Config.PageSize).
.Content array — iterating is still safe, but branch on
IsAborted when it matters.FileItem is not FileInfo — use FullPath, not FullName.Length is 0 for directories — check IsDirectory before treating it as a file size.Options