Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 808 Bytes

File metadata and controls

32 lines (23 loc) · 808 Bytes

Directory Scanner

A Go script that scans directory structure and saves it to output.txt

Features

  • Scans any directory (current directory by default)
  • Option to show only directories or both directories and files
  • Creates hierarchical tree structure with indentation
  • Uses emoji icons for visual distinction (📁 for folders, 📄 for files)
  • Saves results to output.txt in specified location

Usage

  1. Run the script: go run main.go
  2. Enter directory to scan (press Enter for current directory)
  3. Choose whether to show only directories (y/n)
  4. Specify output path for output.txt (press Enter for current directory)

Example Output

📁 folder1
  📁 subfolder
    📄 file1.txt
    📄 file2.txt
  📄 document.pdf
📁 folder2
📄 README.md