Copy Workspace
Easily add external files and folders to your VS Code workspace — choose to copy them in or add as a reference.
✨ Features
- Copy to workspace — Clones the selected file/folder into your workspace root directory
- Add as reference — Adds folders as a multi-root workspace entry, or opens files without copying
- Conflict handling — If a file/folder already exists, choose to overwrite, rename, or skip
- Auto-create workspace — If no workspace is open, creates a new folder, opens it immediately, then copies your files automatically
- Custom workspace name — Choose your own name for the new workspace, or let it auto-generate
- Custom rename on conflict — Type your own name when renaming, or let it auto-generate a suffix
- Progress indicator — A spinner in the status bar shows each file being copied in real time
🚀 How to use
Option 1: Command Palette
- Press
Cmd+Shift+P (macOS) or Ctrl+Shift+P (Windows/Linux)
- Type "Add File/Folder to Workspace"
- Select the file(s) or folder(s) you want to add
- A prompt appears — choose:
- 📋 Copy to workspace — makes a local copy in your project
- 🔗 Add as reference — links to the original location (no copy)
Right-click anywhere in the Explorer sidebar → "Add File/Folder to Workspace (Copy or Reference)"
📋 What each option does
| Action |
Files |
Folders |
| Copy |
Copies file into workspace root |
Copies entire folder into workspace root |
| Reference |
Opens the file (no copy) |
Adds folder as a workspace root (multi-root) |
⚠️ Conflict handling
When copying a file or folder that already exists in the workspace, you can choose:
- Overwrite — replaces the existing file/folder
- Rename — keeps both; you type a new name (or accept the auto-generated one)
- Skip — leaves the existing file untouched
🗂️ No workspace open?
If you run the command with no folder open, the extension will:
- Ask you to name the new workspace folder (or auto-generate one, depending on your settings)
- Open it immediately as a proper workspace
- Copy your files automatically once the workspace loads — you'll see the progress in the status bar
📊 Progress indicator
While copying, a spinner appears in the VS Code status bar (bottom left) showing:
⟳ Workspace Copy Prompt: Copying "my-file.ts" (2/5)…
When done it shows Done — 5 items copied. for a moment, then disappears.
⚙️ Settings
Open Cmd+, and search "Workspace Copy Prompt" to configure:
| Setting |
Description |
Options |
Default |
workspaceCopyPrompt.defaultWorkspacePath |
Where new workspace folders are created |
Any valid path (e.g. ~/Projects) |
~/Documents |
workspaceCopyPrompt.workspaceNameMode |
Whether to ask for a name when creating a new workspace |
ask, auto |
ask |
workspaceCopyPrompt.renameMode |
Whether to ask for a name when renaming a conflicting file |
ask, auto |
ask |
Setting details
workspaceNameMode
ask — shows an input box pre-filled with a suggested name; edit it or press Enter to accept
auto — silently creates the folder with a name like workspace-2026-06-13-abc123
renameMode
ask — shows an input box pre-filled with a suggested name; edit it or press Enter to accept
auto — silently appends a random suffix (e.g. file-3a2f.txt) without prompting
📝 Requirements
- VS Code 1.85.0 or later
- No additional dependencies — just install and use
| |