What Is the Copy File List Context Menu Option in Windows?
Question details
The user wants to know about the Copy File List right-click menu option, what it does, and how to configure or fix it to copy folder contents to the clipboard.

- Product
- Windows OS
- Device & OS
- Windows
- Scenario
- A user is looking to quickly copy a list of file names from a folder directly to the system clipboard via the right-click context menu.
- Observed behavior
- The Copy File List feature is not a native Windows option. It requires a custom Registry modification using CMD or PowerShell commands to function, and older clipboard receivers like Office 2007 may struggle to paste the copied text properly.
Modifying the Windows Registry incorrectly can cause system instability. Please ensure you create a Registry backup or a System Restore point before proceeding with these steps.
Add the Copy File List Option via Registry Editor
Manually create the necessary registry keys to add a functional 'Copy File List' button to your right-click context menu.
Because Windows does not natively include a 'Copy File List' button in the context menu for folders, you must add it manually by creating a custom command in the Registry Editor that outputs the directory listing to the Windows clipboard.
Press the 'Win + R' keys on your keyboard, type 'regedit' in the Run dialog box, and press Enter to launch the Registry Editor.
In the left pane, navigate to the following path: HKEY_CLASSES_ROOT\Directory\shell.
Right-click the 'shell' folder, select 'New', then 'Key'. Name this new key 'CopyFileList'. Double-click its '(Default)' value and set the value data to 'Copy File List'.
Right-click your new 'CopyFileList' key, select 'New', then 'Key', and name it 'command'. Double-click its '(Default)' value and paste the following command: cmd /c dir "%1" /b /a:-d /o:n | clip
Close the Registry Editor. You can now right-click any folder in File Explorer, and you will see the 'Copy File List' option to instantly copy its contents.

Customize the Command to Remove File Extensions
Modify the registry command using PowerShell to copy only the file names without their extensions (.txt, .jpg, etc.).
Troubleshoot Clipboard and Pasting Issues
Verify the clipboard contents and resolve pasting issues when using older software versions.
Upgrade Your Office Suite to Seamlessly Manage Data
If you are experiencing pasting issues with older software like Office 2007, it's time to upgrade. WPS Office is a highly compatible, free, and lightweight alternative that easily handles modern clipboard data, allowing you to paste and format your file lists without glitches.
- 1. Download and Install: Download WPS Office for free from the official website and follow the quick installation prompts.
- 2. Open a New Document or Spreadsheet: Launch WPS Writer or WPS Spreadsheet depending on how you want to format your file list.
- 3. Paste Your List: Simply press Ctrl+V to paste your perfectly formatted copied file list from Windows directly into the WPS workspace.

Frequently Asked Questions
Why doesn't Windows have a native Copy File List button?
While Windows doesn't feature this exact wording in the context menu, Windows 11 introduced a native 'Copy as path' option (accessible via Ctrl+Shift+C) which works similarly but copies the full directory path along with the file name.
How can I remove the Copy File List option if I no longer need it?
To remove the option, open the Registry Editor, navigate to HKEY_CLASSES_ROOT\Directory\shell, right-click the 'CopyFileList' key you previously created, and select 'Delete'.
Will this registry command copy files located inside subfolders?
The basic CMD command (dir /b) provided only copies the names of files located directly inside the selected folder. If you want to include files inside subfolders, you would need to add the '/s' parameter to the dir command.




