Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Copy WorkspaceNew to Visual Studio Code? Get it now.
Copy Workspace

Copy Workspace

Jorge Rios

|
6 installs
| (0) | Free
When adding files or folders, prompts whether to copy them into the workspace or just add a reference.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

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

  1. Press Cmd+Shift+P (macOS) or Ctrl+Shift+P (Windows/Linux)
  2. Type "Add File/Folder to Workspace"
  3. Select the file(s) or folder(s) you want to add
  4. A prompt appears — choose:
    • 📋 Copy to workspace — makes a local copy in your project
    • 🔗 Add as reference — links to the original location (no copy)

Option 2: Right-click menu

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:

  1. Ask you to name the new workspace folder (or auto-generate one, depending on your settings)
  2. Open it immediately as a proper workspace
  3. 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
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft