3テラバイト

プログラム関連備忘録サイト。主にゲーム。

PowerShell

PowerShellでディレクトリ内のファイル一覧を取得するコマンドレットGet-ChildItemの使い方

投稿日:

こんにちは、今日はPowerShellでディレクトリ内のファイル一覧を取得するコマンドレットGet-ChildItemの使い方についてまとめていきます。

確認環境

PSVersion 5.1.18362.1110

Get-ChildItemの使い方

実行すると現在のディレクトリ内にあるディレクトリやファイルに一覧が表示されます。

PS C:\Users\santerabyte> Get-ChildItem


    ディレクトリ: C:\Users\santerabyte


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----       2020/11/09     23:30                Test

リンク

Get-ChildItem (Microsoft.PowerShell.Management) – PowerShell | Microsoft Docs
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-childitem?view=powershell-7

-PowerShell


comment

メールアドレスが公開されることはありません。 が付いている欄は必須項目です


reCaptcha の認証期間が終了しました。ページを再読み込みしてください。

関連記事

no image

PowerShellでアイテムを作成するコマンドレットNew-Itemの使い方

こんにちは、今日はPowerShellでファイルやフォルダ等のアイテムを作成するコマンドレットNew-Itemの使い方についてまとめていきます。 確認環境 PSVersion 5.1.18362.11 …

no image

PowerShellで特定ディレクトリのファイル内文字列を置換する

Get-ChildItem . | ForEach-Object {Get-Content -Encoding utf8 $_ | ForEach-Object {$_ -creplace &#039 …

no image

Windows10でPowerShellスクリプトをスケジュール実行する

こんにちは、今日はWindows10でPowerShellスクリプトを自動実行する方法についてまとめていきます。 自動実行設定 Windows10でPowerShellスクリプトを自動実行するには、タ …

no image

PowerShellで文字列の置換をする方法

確認環境 PSVersion 5.1.18362.1171 文字列の置換 -replace 以下のように置換したい文字列のあとに-replaceとカンマの前に置き換えたい文字列を、カンマの後に置き換え …

no image

PowerShellで画像ファイルのExif情報を取得する

こんにちは、今日はPowerShellで画像ファイルのExif情報を取得するほうほうについてまとめていきます。 確認環境 PSVersion 5.1.18362.1110 Exif情報を取得する Ad …