Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Delete Folder ContentsNew to Visual Studio Code? Get it now.
Delete Folder Contents

Delete Folder Contents

IIEleven11

|
35 installs
| (1) | Free
Adds an option to delete all contents of a folder while leaving the folder in place to the right click context menu.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Delete Folder Contents

A Visual Studio Code extension that adds a context menu option to delete all contents within a folder while keeping the folder itself intact.

Features

  • Adds a "Delete Folder Contents" option to the context menu for folders in the VS Code file explorer.
  • Deletes all files and subfolders within the selected folder, leaving the folder itself untouched.
  • Provides a confirmation prompt before deletion to prevent accidental data loss.
  • Works seamlessly within the VS Code environment.

Installation

  • Open Visual Studio Code
  • Press Ctrl+P (or Cmd+P on macOS) to open the Quick Open dialog
  • Type ext install delete-folder-contents and press Enter
  • Click the Install button to install the extension

Usage

  • Right-click on a folder in the VS Code file explorer.
  • Select "Delete Folder Contents" from the context menu.
  • Confirm the action when prompted.
  • All contents within the selected folder will be deleted, leaving the folder itself intact.

Requirements

Visual Studio Code version 1.60.0 or higher.

Extension Settings This extension does not add any VS Code settings.

Known Issues The extension currently does not provide an option to exclude certain files or folders from deletion. There is no progress indicator for large folders with many files. Release Notes 1.0.0 Initial release of Delete Folder Contents

Contributing Contributions are welcome! Please feel free to submit a Pull Request.

License This extension is licensed under the MIT License.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft