Bulk Copy File and Folder Names
Copy the names of one or many selected files and folders in File Explorer, not the paths, from the right-click menu or with optional hotkeys
Author: Shaerif
Windows has Copy as path (Ctrl+Shift+C), but it gives you full paths in quotes,
and often you only want the names. This mod copies the names of the files and
folders you select in File Explorer as plain text, one per line. It works on one
item or on many at once. A selection can mix files and folders.
Right-click menu
Right-click a file, a folder, or a selection of many files and folders in a File
Explorer window. The classic menu gets two entries, Copy name and Copy name
without extension. On Windows 11 they're in the menu you get from Show more
options or Shift+right-click. The entries are on by default, and you can turn
them off in the settings.
Copy name without extension keeps folder names whole, so sub.folder stays
sub.folder, and a.tar.gz becomes a.tar. A name that starts with a dot, like
.gitignore, stays whole.
Hotkeys
The hotkeys are off until you turn them on, so a fresh install takes no key away
from File Explorer. To turn them on, open the mod's Settings tab in Windhawk,
tick Hotkeys, and save. The defaults are Ctrl+Shift+Y for names with extensions
and Ctrl+Shift+U for names without. You can change both keys there too.
A key is handled inside the File Explorer window that has the focus, so it never
reaches other programs. It does nothing while you type in a rename box, the
address bar or the search box, and it does nothing when no file or folder is
selected. In both cases the key goes to File Explorer as usual.
If you pick a key that File Explorer already uses, like Ctrl+Shift+N for New
folder, the mod wins while the hotkeys are on and something is selected.
Settings
- Hotkeys: turn the two key combinations on. Off by default.
- Modifiers and key for each copy action. Ctrl+Alt and Ctrl+Alt+Shift also
match AltGr, so skip them if your keyboard layout types letters with AltGr.
- Separator: a new line, a comma, or a space between names.
- Quote names: put each name in double quotes.
- Right-click menu: show the two menu entries. On by default.
Limits
- The keys and menu entries don't work on the desktop or in file dialogs. Only
File Explorer windows count.
- The Windows 11 compact menu can't take new entries from a mod. Use Show more
options.
- The menu entries don't show on the column header menu, the menu you get from
empty space in a folder, or the menu you get after a drag with the right
mouse button.
- Items that aren't files or folders, like drives in This PC, give their
internal name.
- If nothing is selected, nothing happens.
Tutorial
- Select the files and folders in a File Explorer window. A mix of both is
fine.

- Hold Shift and right-click the selection. Pick Copy name or Copy name
without extension.

- Paste. Copy name gives you every name with its extension, one per line.

- Copy name without extension drops the extension from files and keeps the
full name of folders.

- If you'd rather use the keyboard, tick Hotkeys in the settings. Ctrl+Shift+Y
then does what Copy name does, and Ctrl+Shift+U does what Copy name without
extension does.
Gotchas
- In step 2, the compact Windows 11 menu can't show the entries. Use
Shift+right-click or Show more options.
- In step 4, only the last extension goes, so
archive.tar.gz becomes
archive.tar.
- In step 5, a key does nothing while you type in a rename box, the address bar
or the search box, and nothing while no item is selected. File Explorer gets
the key instead.
Credits
The way the hotkeys are caught, a hook on TranslateAcceleratorW that steps
aside while a text box has the focus, follows the approach of the Explorer
Custom Shortcuts mod.