Name Path Copier
This project is a fork of Editor Path Copier by Kosuke Saigusa. It keeps the original one-click toolbar idea and adds file-name copying plus per-button settings.

A VS Code extension that copies the current file's absolute path, relative path, or file name (without extension) from the editor toolbar.

Features
- One-click copy from the editor toolbar (top-right)
- Three copy actions:
- Absolute path (
C:\projekty\app\src\extension.ts)
- Relative path (
src/extension.ts)
- File name (
extension)
- Each button can be shown or hidden, reordered, and given a different Codicon
- Notification confirms what was copied
- Works out of the box; settings are optional
Usage
- Open any local file in VS Code
- Use the buttons in the editor toolbar
- The value is copied to the clipboard
Default order and icons (all buttons default to position 1):
| Default order |
Action |
Default icon |
| 1 |
Copy Absolute Path |
files |
| 1 |
Copy Relative Path |
files |
| 1 |
Copy File Name |
whole-word |
Configuration
Open Settings and search for Name Path Copier, or edit settings.json.
Each action has three settings: enabled, order (1 / 2 / 3), and icon.
{
"name-path-copier.copyAbsolutePath.enabled": true,
"name-path-copier.copyAbsolutePath.order": 1,
"name-path-copier.copyAbsolutePath.icon": "files",
"name-path-copier.copyRelativePath.enabled": true,
"name-path-copier.copyRelativePath.order": 1,
"name-path-copier.copyRelativePath.icon": "files",
"name-path-copier.copyFileNameWithoutExtension.enabled": true,
"name-path-copier.copyFileNameWithoutExtension.order": 1,
"name-path-copier.copyFileNameWithoutExtension.icon": "whole-word"
}
Give visible buttons different order values if you want a fixed left-to-right sequence. Available icons include copy, file, files, link, location, whole-word, folder, and others listed in the setting dropdown.
Changes apply immediately, without reloading the window.
Installation
Install from the Visual Studio Marketplace, or in VS Code open Extensions and search for Name Path Copier.
This project is a fork. The original extension is still on the Marketplace.
Development
Prerequisites
Setup
git clone https://github.com/kryzasada/editor-path-copier.git
cd editor-path-copier
npm install
Available Scripts
npm run compile # Generate toolbar contributions and compile TypeScript
npm run sync-contributes # Refresh commands/menus/settings from src/toolbar-spec.json
npm run watch # Watch mode compilation
npm run check # Run Biome linting and formatting
npm run package # Create VSIX package
Toolbar buttons, settings, and icons are generated from src/toolbar-spec.json. Edit that file, then run npm run compile.
Testing
- Press
F5 to run the extension in a new Extension Development Host window
- Open any file and test the toolbar buttons and settings
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
This project uses:
- Biome for code formatting and linting
- GitHub Actions for CI and a manual release workflow
License
MIT © Kosuke Saigusa and kryzasada