Skip to content
| Marketplace
Sign in
Visual Studio>Tools>CopyRelativePath
CopyRelativePath

CopyRelativePath

Preview

mere-human

|
251 installs
| (1) | Free
Adds copy relative file path command and more.
Download

This Visual Studio extension adds advanced path copying commands. Available commands:

  1. Copy Relative Path - Get a relative path to a selected document. Example: transform D:\notepad-plus-plus\PowerEditor\src\resource.h → PowerEditor/src/resource.h.

  2. Copy URL - Append a relative path to a base URL specified in preferences. This might be used to get a GitHub link to the selected document in Visual Studio. Example: transform D:\notepad-plus-plus\PowerEditor\src\resource.h → https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/src/resource.h.

  3. Copy Current Line URL - Same as Copy URL but link to a specific line. Example: https://github.com/vim/vim/blob/master/Makefile#L100

  4. Copy Include - Get a relative path while removing directories specified in Include Directories option. Useful for C/C++ projects (#include directive).

Extension commands are available in:

  1. Context menu for a document tab

document tab menu

  1. Context menu for an item in the Solution Explorer:

solution explorer menu

  1. Context menu in the editor

editor context menu

Settings can be customized in Tools > Options > Copy Path Extension:

options dialog

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft