Skip to content

Instantly share code, notes, and snippets.

@lundeen-bryan
Last active September 9, 2023 20:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lundeen-bryan/fb4dbdc3d22ed543df4fff8c1386297e to your computer and use it in GitHub Desktop.
Save lundeen-bryan/fb4dbdc3d22ed543df4fff8c1386297e to your computer and use it in GitHub Desktop.
Help and How To

CREATE A CLASSIC SHELL EXPLORER TOOLBAR BUTTON TO COPY AS PATH

I often really like to copy a file or folder path to the clipboard. If you use Classic Shell with the additional Shell Explorer toolbar, then you can do this by following these instructions. Much of this information I found on Winaero 1 but I also had to adapt it to my own setup.

  1. Open Classic Explorer Settings and switch to the "Toolbar Buttons" tab. There you will see two columns with various commands. The left one is your current toolbar, and the right column is the available set of commands which you can add.
  2. You will see a "Custom" item in the right column if you scroll down. Add this new Custom item to the left column by dragging it from the right column to the left or by double clicking it. You can reposition it anywhere you want after you add it to the left column.
  3. Double click the Custom button item and an "Edit Toolbar Button" dialog will appear on the screen:

Using ClassicShell Custom Button

  1. Use the following text for the Command field:
cmd /c echo|set /p="%2"|clip

This will copy the path of the selected item in Explorer to the clipboard, without inserting a new line character. See the following article for "how to make the echo command without a new line in Windows" 2.

  1. There is an icon that windows usually uses for the purpose of copying a file path and you can find it under C:\Windows\System32\imageres.dll use icon # 5302. Copy as path icon

Works Cited

Footnotes

  1. Tkachenko Sergey. "How to make the echo command without new line in Windows." winaero.com, 3 Jul. 2014, https://winaero.com/how-to-make-the-echo-command-without-new-line-in-windows/. Accessed 09 Sep. 2023.

  2. Tkachenko Sergey. "How to add Copy as Path button to the Classic Shell Explorer toolbar." winaero.com, 6 Jul. 2014, https://winaero.com/how-to-add-copy-as-path-button-to-the-classic-shell-explorer-toolbar/. Accessed 09 Sep. 2023.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment