Folder Duplicator
VS Code extension: Duplicate the currently open folder and open it in a new window.
Features
- Duplicate the current workspace folder alongside the original.
- Support custom naming of the new folder.
- Handles large folders with progress notifications.
- Customize exclude patterns via settings.
Usage
- Open a folder in VS Code.
- Open the Command Palette (
Cmd+Shift+P / Ctrl+Shift+P ).
- Run "Duplicate Current Folder".
- Enter a new folder name (or accept the suggested one).
- After duplication completes, the folder opens in a new window automatically.
Settings
You can customize exclude patterns from VS Code settings:
{
"folderDuplicator.excludePatterns": [
"node_modules",
".git",
"dist",
"*.log",
".DS_Store"
]
}
By default, the exclude patterns list is empty (all files are copied).
Development
# Install dependencies
npm install
# Type-check TypeScript
npm run check
# Build
npm run compile
# Run tests
npm test
# Watch mode (dev)
npm run watch
Debugging
- Open the project folder in VS Code.
- Press F5 to start debugging.
- In the new VS Code window, run the command to verify behavior.
Architecture
Layered architecture:
- Commands layer: VS Code command handlers
- Services layer: Business logic
- Infrastructure layer: File system / VS Code API
License
MIT
| |