🚀 Copy & create folder structures, file names and jump-ready line paths.
Table of Contents
Features
📁 Copy Folder Structure
- 🎯 Two Output Formats: JSON & Plain Text
- 🖱️ Right-Click Integration: Easy access from Explorer context menu
- 🙈 Respects .gitignore: Automatically excludes ignored files
- ⚡ Smart Filtering: Skips node_modules and hidden files
🏗️ Create Folder Structure
- 📝 Multiple Input Formats: Support for JSON and Plain Text
- 🖥️ Modern UI: Shows the destination folder, a live preview of what will be created, each line to fix, and a count on the Create button; works in narrow editor groups
- 🔄 Smart Handling: Existing folders are reused; for existing files you choose Replace or Skip
- 🗑️ Safe Replace: Only the conflicting files are emptied, and their old versions go to the Trash
- 🛡️ All or Nothing: If anything fails, or you press Cancel, everything that run created is removed and replaced files are restored
- 🔒 Safe Names: Names that would leave the chosen folder (such as
../) are refused before anything is created
- 💬 Inline Comment Support:
# and // comments are silently ignored — paste annotated structures from READMEs or AI output directly
📄 Copy File Name
- ⚡ One-Click Copy: Quick file name copying to clipboard
- 🎯 Simple & Fast: Right-click any file to copy its name
Copy Line Path
- 📋 Copy jump-ready
relative/path:line for VS Code Quick Open
- ⚙️ Configurable: Optional
:column and absolute path modes
- ⌨️ Keyboard Binding:
Ctrl+Shift+T / CMD+k CMD+t on Mac
Quick Start
- 📥 Install the extension from VS Code Marketplace
- 🖱️ Right-click any folder in Explorer
- 🎯 Choose "Copy Folder Structure As" or "Create Folder Structure"
- 🎉 Done! Your structure is ready to use
⚡ Command-Line Interface (NEW!)
Prefer the terminal? Folder Structure Pro is now available as a standalone CLI!
Generate, copy, export, and recreate project folder structures directly from your terminal — without opening VS Code.
Install and get started:
# Run directly without a global installation
npx folder-structure-pro
Or install it globally:
npm install -g folder-structure-pro
Quick examples:
# Copy the current project's structure
folder-structure-pro copy
# Export a structure to a text file
folder-structure-pro export . --output folder-structure.txt
# Recreate a project from an exported structure
folder-structure-pro create structure.txt --to ./new-project --yes
The CLI supports interactive mode, clipboard copying, text and JSON formats, flexible filtering, and safe structure creation.
Requires Node.js >=22.14.0.
How to Use
📁 Copy Folder Structure
- 🖱️ Right-click a folder in VS Code Explorer
- 📋 Select "Copy Folder Structure As" and choose Plain Text or JSON
- 📄 Structure is copied to clipboard in the selected format
🏗️ Create Folder Structure
- 🖱️ Right-click in Explorer OR use Command Palette (
Ctrl+Shift+P)
- 🎯 Choose "Create Folder Structure"
- 📂 Select the target directory
- 📝 Choose format and paste your structure
- ✨ Click Create and watch the magic happen!
📄 Copy File Name
- 🖱️ Right-click any file → 📋 "Copy File Name"
📋 Copy Line Path
- 🖱️ Right-click inside the editor → 📋 "Copy Line Path"
- 📝 Paste into Quick Open (
Ctrl+P / Cmd+P) to jump directly to that line.
Settings
Configure the extension to work exactly how you want:
- 📄 outputFormat: Choose between JSON Format or Plain Text Format
- 🚫 ignorePatterns: Specify patterns to ignore when copying structures
- 🙈 respectGitignore: Honor .gitignore rules (recommended: enabled)
- 🧩 includecolumn: Include column number in copied path:line
- 🛣️ useAbsolutePath: Use absolute paths instead of workspace-relative
🎛️ Settings Preview
Live Previews
📄 Copy File Name in Action
🏗️ Create Folder Structure
💼 Common Usage
🔗 With Git Ingest Integration
📋 Copy Line Path
Output Examples
Perfect for programmatic use - files are represented as type strings:
{
"app": {
"api": {
"analyze-typography": {
"route": "ts"
}
},
"favicon": "ico",
"globals": "css",
"layout": "tsx",
"page": "tsx"
}
}
Inline comments (# or //) are supported and ignored during parsing:
{
"app": { // root of the Next.js app
"api": { # server-side routes
"analyze-typography": {
"route": "ts" // API handler
}
},
"favicon": "ico",
"globals": "css", // global styles
"layout": "tsx",
"page": "tsx"
}
}
🌳 Plain Text Format
Human-friendly GitIngest-style tree structure:
Directory structure:
└── app/
├── api/
│ └── analyze-typography/
│ └── route.ts
├── favicon.ico
├── globals.css
├── layout.tsx
└── page.tsx
Inline comments (# or //) are supported and ignored during parsing:
Directory structure:
└── app/
├── api/ # server-side routes
│ └── analyze-typography/
│ └── route.ts // API handler
├── favicon.ico
├── globals.css // global styles
├── layout.tsx
└── page.tsx
📝 Plain Text Rules:
- ✅ The
Directory structure: heading is optional
- 🔗 Every line must use tree connectors (
├── or └──)
- 📁 One or more root entries; directories end with
/, and root-level files are supported
- 📏 Consistent indentation (increases by one level each time)
- 💬 Inline comments (
# ... or // ...) after a space are silently ignored — names like C#-project are safe
- ⚠️ Invalid lines are listed in the preview with their line numbers; Create Structure stays disabled until every line can be read
📋 Copy Line Path
- 📋 Copies
relative/path/to/file:line (or absolute path if enabled)
:column can be appended if enabled in settings
utils/animations/executionAnimations.ts:152:16
How It Works
📁 Copy Folder Structure
- 🔍 Scans the selected folder intelligently
- 🙈 Respects .gitignore and exclude patterns
- 🚫 Filters out node_modules and hidden files automatically
- 📋 Copies structure in the format you pick from the submenu (JSON or Plain Text)
🏗️ Create Folder Structure
- 📖 Reads input from the modern webview interface, with the same rules as the CLI
- ✅ Validates the structure and checks every name and existing path in the chosen folder
- ⚠️ Asks Replace or Skip when files already exist, listing them
- ✨ Creates everything, or nothing: a failure or Cancel undoes the whole run
📄 Copy File Name
- 🖱️ Right-click any file in Explorer
- 📋 Copies the file name directly to clipboard
📋 Copy Line Path
- ⚙️ Reads your settings to determine column and path mode
- 🛣️ Builds a path string (relative or absolute) and normalizes separators to
/
- 🔢 Appends
:line (and :column when enabled) using 1-based positions
- 📋 Copies the result to the clipboard for Quick Open compatibility
Troubleshooting
❓ Common Issues & Solutions:
🚫 No Option in Context Menu
- 🔄 Solution: Reload VS Code (
Ctrl+Shift+P → "Reload Window")
📋 Clipboard Not Working
- 🔐 Solution: Check system clipboard permissions
❌ Input Error (Create Function)
- 📝 Solution: Ensure input follows correct JSON or Plain Text format. Inline comments (
# or //) are supported and will be ignored automatically.
📄 Copy File Name Not Working
- 📁 Solution: Make sure you've selected a valid local file (not a folder)
Contributing
Contributions are welcome. If you want to report a bug, suggest a feature, or help improve the extension, please read the contributor guide:
The guide covers setup, local checks, testing, pull request expectations, and dependency updates.
Development package manager
Contributors must use pnpm 12.21.0. Enable Corepack with corepack enable, then install dependencies with pnpm install --frozen-lockfile. See CONTRIBUTING.md for setup and development commands. npm install and npm ci are not supported for project dependencies.
License
MIT License — see LICENSE for details
🐛 Found a bug? 🚀 Have a feature request?
Open an issue on our GitHub repository
Made with ❤️ for developers worldwide 🌍
⭐ If this extension helped you, please consider giving it a star on the GitHub and marketplace!
✨ Love this project? Sponsor me to help fuel more open-source work!