Files 2 Folders
Move or copy one or more selected files in Explorer into a subfolder (named — nested paths with "/" supported, by extension, by name, or by date), with a workaround hotkey for other file managers
Author: tria

Inspired by Files 2 Folder
by Jody Holmes (Skwire Empire).
When one or more items are selected in an Explorer window, adds a
Move to a folder... entry to the right-click context menu (using your
Windows language's own "Move to a folder" string). Choosing it opens a dialog
with four options for moving the selection into a new subfolder:
-
Move the selection into a subfolder with a fixed name (defaults to the
localized Windows "New folder" name; e.g. New folder). By default, if a
folder of that name already exists the selection is moved into it (so
repeated runs accumulate in, e.g., archive). Turn off Fixed name: reuse
an existing folder in settings to instead create a fresh numbered folder
each time (archive, archive (2), archive (3), … — the way Explorer
numbers duplicates).
Nested subfolders: type a / (or \) in the name to build a whole path
at once. test/1/2/3/name creates test\1\2\3\name and moves the selection
into the final name folder. The intermediate folders (test\1\2\3) are
created if missing and reused if they already exist; only the last
segment follows the reuse/numbering rule above. Each segment is sanitized
individually, and empty segments (leading, trailing, or doubled separators)
are ignored.
Two optional aids for building nested paths (both on by default, each has
its own settings toggle):
- A small preview line under the box shows the typed name split into
its segments, e.g. typing
archive/incoming shows archive › incoming
as you type.
- A + button next to the box appends a
\ and refocuses the box, so
you can build a path by clicking instead of typing / or \ yourself.
-
Move each file into a subfolder named after the file (without extension):
Good.bat -> .\Good\Good.bat. With a single file selected, this just
creates one folder around that file.
-
Move each file into a subfolder named after its extension
(e.g. all .txt files into .\txt\). With a single file selected, this
creates one folder named after that file's extension.
-
Move the selection into a subfolder named with the current date/time,
formatted using the date format from settings.
Folders inside the selection are skipped for modes 2 and 3 (they only make
sense for files); they are still moved for modes 1 and 4.
This works in both Explorer folder windows and on the desktop.
The menu entry and the default subfolder name use Windows' own localized
strings, so they appear in your OS language automatically.
Silent mode
Enable Silent mode (right-click menu) in settings to skip the dialog
entirely: choosing Move to a folder... from the right-click menu then
moves (or copies — see Operation below) the selection immediately, using
the Default selected mode (and default subfolder name / date format) from
settings. The hotkey workaround is unaffected and always shows the dialog.
Right-click menu position
By default the entry sits at the top of the context menu with a separator
below it. Set Right-click menu position to Between Cut and Copy to
insert it just after the shell's Cut/Copy block (between Copy and Paste)
instead. This only applies to the classic context menu (Shift+right-click on
Windows 11, or the stock Windows 10 / StartAllBack / ExplorerPatcher menu) —
the modern Windows 11 flyout can't be modified, so the entry falls back to the
top there.
Operation: move (fast), move (safe), or copy
The Operation setting controls what happens to the selection:
- Move — fast (default): uses
MoveFileExW directly, which is essentially
instant for same-volume moves, but there's no progress bar, no Ctrl+Z
undo, and no UAC prompt if a destination needs admin rights (it just fails).
- Move — safe: routes moves through
IFileOperation instead — that gives
you the standard Windows progress dialog, Ctrl+Z undo, UAC elevation
prompts for protected paths, and conflict-resolution dialogs, at the cost of
significantly slower operation on large selections.
- Copy: copies the selection into the subfolder via
IFileOperation,
leaving the originals in place. Same shell progress / undo / conflict UI as
the safe move.
In copy mode the dialog options say "Copy" rather than "Move", so you can tell
the configured operation at a glance.
The dialog also has an Operation segmented control above the mode list —
three buttons glued together (Move - fast / Move - safe / Copy),
the active one shown pressed/held down. Picking one changes the operation for
just this one run, without touching the Operation setting — handy for a
one-off copy, or a one-off progress-bar/undo-capable move, without changing
your default. It relabels the mode list immediately (Move ↔ Copy) and
doesn't persist: the next time the dialog opens it starts from the
configured Operation again. Silent mode has no dialog, so it always uses
the configured Operation as-is.
Workaround for other programs
A configurable global hotkey (default Ctrl+Alt+F) makes the mod usable
from any file manager (Total Commander, Directory Opus, Files, XYplorer,
Q-Dir, etc.):
- Select one or more files in the other program.
- Press Ctrl+C (or Ctrl+X) to put the file paths on the clipboard.
- Press the hotkey. The dialog appears, the files get moved into the chosen
subfolder under their parent directory.
Toggle Silent to suppress the help popup when the clipboard is empty.
Ctrl/Alt-based combos use a normal global hotkey. Enabling the Win modifier
switches the workaround to a low-level keyboard hook (the technique PowerToys
uses) and suppresses the OS default for that combo.
The hotkey is owned by a single Explorer instance per session, so running
multiple Explorer windows in separate processes doesn't multiply the hook or
the registration. If that one instance closes, the hotkey resumes after an
Explorer restart.
Important: bare Win+<letter> shortcuts (Win+F, Win+E, Win+R, Win+L,
Win+G, …) are handled by Windows itself, below the hook, and cannot be
intercepted — they won't work even with the hook (PowerToys can't remap them
either). To use the Win key, pair it with another modifier: enable Win
together with Ctrl, Alt, or Shift (e.g. Win+Shift+F or Win+Alt+F). If
you don't need a Win-based shortcut, leave Win off and use a Ctrl/Alt combo —
the hook watches all keystrokes while active and is slightly heavier.
Date format
Uses the same tokens as Win32 GetDateFormat / GetTimeFormat:
yyyy MM dd HH mm ss etc. Example: yyyy-MM-dd-HH-mm.
Forbidden characters in folder names (* : ? " < > | / \) are replaced with
_ automatically.