Copy Content
Copy the contents of selected files and folders directly to your clipboard, including a clear header with the relative path of each file.
Designed to make sharing code, configs, or project snapshots fast and clean.
Features
- Copy the content of:
- One file
- Multiple files
- One folder (recursive)
- A mix of files and folders
- Each file is preceded by a header with its relative path
- Skips binary files automatically
- Fully configurable exclusions via VS Code Settings
- Available directly from the File Explorer context menu
Example output:
### src/index.ts
<file content>
### package.json
<file content>
How to use
- Open the VS Code File Explorer
- Select one or more files and/or folders
- Right-click
- Click Copy Content
- Paste wherever you need (chat, issue, document, etc.)
Extension Settings
This extension contributes the following settings:
copyContent.excludeDirectories
Directories to skip when copying folder contents.
Default:
["node_modules", ".git", "dist", "out"]
copyContent.excludeFiles
File names to skip (exact match).
Example:
["package-lock.json", "pnpm-lock.yaml"]
copyContent.excludeExtensions
File extensions to skip (without dot).
Example:
["png", "jpg", "pdf"]
Requirements
No external dependencies.
Known Issues
- Very large files may take some time to process.
- Symbolic links are treated as regular files or directories.
License
MIT