0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Powershell Tips

Last updated at Posted at 2024-09-24

ファイル名/フォルダ名のみ出力したい

Get-ChildItemで出力できるが、ファイル/フォルダ名をコピペするには不要な情報が多すぎる ※dirでも同じ結果

PS>Get-ChildItem


    ディレクトリ: (カレントディレクトリパス)


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        2024/09/24     13:40                b
-a----        2024/09/24     13:40              0 a.txt

-Nameオプションを使う

PS>Get-ChildItem -Name
b
a.txt
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?