LoginSignup
2
1

More than 1 year has passed since last update.

【コマンド】ディレクトリ構成図をtreeコマンドで作成

Posted at

環境

  • Microsoft Windows 10.0.22000.613(21H2)
  • Windows Terminal 1.12.10983.0
  • PowerShell 7.2.2
  • Command Prompt
ディレクトリ構成
C:\USERS\USERNAME\DESKTOP\TEST
└─parent
    │  parent1.txt
    │  parent2.txt
    │
    └─child
            child1.txt
            child2.txt

treeコマンド

カレントディレクトリ(フォルダのみ)

ターミナル
tree
出力
C:.
└─parent
    └─child

カレントディレクトリ(ファイルも含む)

ターミナル
tree /f
出力
C:.
└─parent
    │  parent1.txt
    │  parent2.txt
    │
    └─child
            child1.txt
            child2.txt

パスを指定(フォルダのみ)

ターミナル
tree C:\Users\username\Desktop\test
出力
C:\USERS\USERNAME\DESKTOP\TEST
└─parent
    └─child

ディレクトリをターミナルにドラッグ&ドロップするとパスが入力される。

パスを指定(ファイルも含む)

ターミナル
tree /f C:\Users\username\Desktop\test
出力
C:\USERS\USERNAME\DESKTOP\TEST
└─parent
    │  parent1.txt
    │  parent2.txt
    │
    └─child
            child1.txt
            child2.txt

参考

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1