Zip With Path

Zip files and folders directly from VS Code explorer with full path preservation or simplified structure options.
Features
Right-click any file or folder in VS Code Explorer to access Zip With Path submenu with intelligent options:

📁 Two Zipping Modes
With Full Path
Preserves complete folder hierarchy from workspace root:
Workspace: /my-project/
File: /my-project/src/components/Button.tsx
Result: Button.zip contains → src/components/Button.tsx
Files Only
Creates clean zip with just the files/folders:
Workspace: /my-project/
File: /my-project/src/components/Button.tsx
Result: Button.zip contains → Button.tsx
🔄 Multiple Selection Support
Select multiple files and folders (Ctrl+Click) for batch zipping:

⚡ Features at a Glance
Feature |
Description |
Smart Naming |
Automatically handles file conflicts with file(1).zip , file(2).zip |
Progress Tracking |
Real-time progress notifications during zip creation |
Workspace Safety |
Only operates within workspace boundaries for security |
Cross-Platform |
Works on Windows, macOS, and Linux |
No Overwriting |
Never overwrites existing files without confirmation |
Size Display |
Shows compressed file size after creation |
Usage Examples
Single File
- Right-click any file in Explorer
- Select Zip With Path → With full path or Files only
- Zip created in same directory
Single Folder
- Right-click any folder in Explorer
- Choose Zip With Path → With full path or Folder only
- Complete folder structure preserved or simplified
Multiple Items
- Select multiple files/folders (Ctrl+Click)
- Right-click selection → Zip With Path
- Choose path preservation option
- All items combined into single zip
Workspace
- Open Command Palette (
Ctrl+Shift+P
)
- Type "Zip workspace"
- Select workspace folder to compress
Installation
From VS Code Marketplace
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X
)
- Search for "Zip With Path"
- Click Install
From Marketplace Website
Download from VS Code Marketplace
Manual Installation
- Download the
.vsix
file from Releases
- In VS Code:
Ctrl+Shift+P
→ "Extensions: Install from VSIX..."
- Select the downloaded file
Commands
Command |
Shortcut |
Description |
Zip File (Full Path) |
Right-click file |
Preserve full workspace path |
Zip File (Files Only) |
Right-click file |
File name only |
Zip Folder (Full Path) |
Right-click folder |
Preserve folder hierarchy |
Zip Folder (Folder Only) |
Right-click folder |
Just folder contents |
Zip Selected (Full Path) |
Right-click selection |
Multiple items with paths |
Zip Selected (Files Only) |
Right-click selection |
Multiple items, names only |
Zip Workspace |
Command Palette |
Entire workspace folder |
Configuration
No configuration required! The extension works out of the box with intelligent defaults.
Examples
Example 1: Component File
Project structure:
my-app/
├── src/
│ └── components/
│ └── Button.tsx
└── package.json
Right-click Button.tsx:
• "With full path" → Button.zip contains: src/components/Button.tsx
• "Files only" → Button.zip contains: Button.tsx
Example 2: Multiple Files
Select: Header.tsx, Footer.tsx, Button.tsx
Right-click selection:
• "With full path" → selected_files.zip contains:
- src/components/Header.tsx
- src/components/Footer.tsx
- src/components/Button.tsx
• "Files only" → selected_files.zip contains:
- Header.tsx
- Footer.tsx
- Button.tsx
Example 3: Entire Folder
Right-click src/ folder:
• "With full path" → src.zip contains: src/components/..., src/utils/...
• "Folder only" → src.zip contains: components/..., utils/...
Requirements
- VS Code 1.74.0 or higher
- Node.js (for development)
Support
Release Notes
0.0.1
- Initial release
- Context menu integration
- Full path and files-only zipping modes
- Multiple file selection support
- Progress notifications
- Cross-platform compatibility
License
MIT License - see LICENSE file for details.
Enjoy zipping! 🎉
Made with ❤️ for the VS Code community