LoginSignup
1

More than 5 years have passed since last update.

Power Shell でフォルダ内のzipファイルをリストアップする

Posted at

やりたいこと

たくさんダウンロードしたので、まとめて処理したい。
指定フォルダ内にある、zipファイルの一覧を取得したい。

コード

$items = Get-ChildItem "C:\Users\xxx\Downloads" -Filter *.zip
foreach ($item in $items) {
    Write-Output ( $item.fullname )
}

要点

  • Get-ChildItem でファイル一覧が取得できる。
  • -Filter *.zip で絞り込める
  • foreach でループさせる。
  • .fullname でフルパスを取得できる。

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
1