Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>File Tree GrabberNew to Visual Studio Code? Get it now.
File Tree Grabber

File Tree Grabber

aidankmcalister

|
1 install
| (0) | Free
Generate a directory structure with a simple copy and paste
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

File Tree Grabber

File Tree Grabber

Generate and copy file tree structures from VS Code.

Usage

Right-click on any file or folder in the explorer:

  • Copy File Tree – copies the tree to clipboard
  • Preview File Tree – opens a live preview with options
  • Copy Tree + Contents (AI) – copies tree + file contents for AI prompts

Keyboard shortcut:

  • Cmd+Option+C (Mac) / Ctrl+Alt+C (Windows) – copy entire project tree

Output Formats

  • ASCII (default)
  • JSON
  • YAML
  • XML

Options

Setting Description
maxDepth Limit tree depth (-1 = unlimited)
sortOrder type (folders first) or alphabetical
useEmoji Add 📂 📄 icons
showFileSize Display file sizes
showHiddenFiles Include dotfiles
directoryOnly Show only folders

Example Output

Output for Copy File Tree:

my-project/
├── src/
│   ├── index.ts
│   └── utils.ts
├── package.json
└── README.md

Output for Copy Tree + Contents (AI):

# File Tree

```
my-project/
├── src/
│   ├── index.ts
│   └── utils.ts
├── package.json
└── README.md
```

# File Contents

## src/index.ts

```typescript
import { greet } from "./utils";

console.log(greet("World"));
```

## src/utils.ts

```typescript
export function greet(name: string): string {
  return `Hello, ${name}!`;
}
```

License

MIT

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