Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Auto Open FolderNew to Visual Studio Code? Get it now.
Auto Open Folder

Auto Open Folder

Traveler

|
1 install
| (0) | Free
Automatically opens the parent folder when a file is opened without a workspace
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Auto Open Folder

Double click a file, it opens alongside the parent folder.

Automatically opens the parent folder in a new VS Code window when you open a file from outside the current workspace.

What it does

  • If you open a file that is not part of the currently open project:

    • The file’s folder opens in a new VS Code window
    • Your existing window is left untouched

Why

VS Code allows opening single files without context.
This extension restores project context automatically.

Settings

  • Auto Open Folder: Enabled
    Toggle the extension on or off.

Notes

  • The initial file may briefly open before being moved to its folder.
  • This is a limitation of the VS Code API.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft