To copy all text in TXT files, we usually need to open documents, select content, and press the Ctrl + C hotkey. However, it would be more convenient if Windows 11’s context menu included an option that copies TXT files to the clipboard. Then users could copy text files simply by right-clicking them and selecting a copy context menu option.

Of course, Windows 11’s context menu doesn’t include such an option. However, that doesn’t mean it can’t have one. This is how you can add a Copy Content to clipboard option for text (TXT) document files to the context menu in Windows 11.

How to Set Up a Copy to Clipboard Context Menu Option for Text Files

To add a new Copy Content context menu option for text files, a bit of registry editing is required. You’ll need to add a couple of new keys to the registry and modify their string values. It is a relatively straightforward registry tweak, but you can back up the registry or set up a restore point beforehand if preferred. Just follow these steps exactly as outlined to set up a Copy Content option.

  1. Launch the Run accessory (press its Windows + R key combination).
  2. Type regedit in Run, and click the OK button.
  3. Navigate to the HKEY_CLASSES_ROOT\SystemFileAssociations\text\shell key within the Registry Editor. You can copy and paste that path into Registry Editor’s location bar by selecting the text and pressing Ctrl + C and Ctrl + V.
  4. Right-click shell and select New to open a submenu.
  5. Select the Key option on the submenu.
    The New > Key options
  6. Enter CopytoClip within the text box for the new key.
  7. Click CopytoClip with your right mouse button and select New > Key.
  8. Type command to be the subkey’s title.
    The CopytoClip key
  9. Select the CopytoClip key, and double-click its (Default) string.
  10. Type Copy Content within the Edit String window, and click OK to exit.
  11. Select the command subkey, and double-click (Default) on the right of the window.
  12. Enter cmd /c clip < "%1" into the Value data box.
    The Edit String window
  13. Select OK to exit the Edit String window.

Find a TXT text document within File Explorer. Right-click the TXT file to select Show more options. You should now see a Copy Content option on the classic menu. Select that option to copy the text file’s content to the clipboard.

The Copy Content context menu option

To check if the text content has been copied, press the Windows + V key to bring up the Clipboard history tab shown directly below. There you can select multiple copied items to paste into documents. To paste a copied text file’s contents somewhere else, open a suitable app and press the Ctrl + V keyboard shortcut.

The Clipboard history tab

If you ever want to remove the Copy Content option, erase its CopytoClip key. You can do so by opening the registry at the HKEY_CLASSES_ROOT\SystemFileAssociations\text\shell\CopytoClip location. Right-click CopytoClip there to select a Delete option.

The Delete key option

Read also: What Is the Windows Registry and How Do I Edit It?

How to Set Up Copy to Clipboard Context Menu Options for Other File Formats

The Copy Content option above will only be available for Notepad’s TXT text file format. However, you can set up more Copy Content context menu options for other file formats by editing the registry much the same. You can set up copy options for registry script (REG), batch (BAT), Extensible Markup Language (XML), and JavaScript (JS) at these registry locations:

  • REG: HKEY_CLASSES_ROOT\regfile\shell
  • BAT: HKEY_CLASSES_ROOT\batfile\shell
  • XML: HKEY_CLASSES_ROOT\xmlfile\shell
  • JS: HKEY_CLASSES_ROOT\JSFile\shell

To set up copy options for those file formats, follow the registry-editing steps above for their listed shell key locations. Add CopytoClip and command keys to them with the same (Default) string values specified for the TXT format. Then you’ll be able to select a Copy Content option on the context menu for REG, BAT, XML, and JS files.

The regfile registry key

Read also: How to Add Software Shortcuts to Windows 11’s Desktop Context Menu

Copy Text Files Quicker From the Context Menu

The Copy Content option for text files will come in handy whenever you need to copy all the contents from TXT documents into other software. When that context menu option is available, you won’t need to open up TXT files, select all their text, and press the Ctrl + C hotkey to copy. So, that’s a convenient shortcut you can add to the context menus in Windows 11 and 10 by editing the registry as covered above.