Un esempio PowerShell di come elencare solo i file presenti in una cartella

PowerShell

Get-ChildItem C:\ | Where-Object {-not ($_.mode -match "d")}
oppure solo le directory (tolto keyword -not)

PowerShell

Get-ChildItem C:\ | Where-Object {$_.mode -match "d"}
Tags:
PowerShell199 Script85
Potrebbe interessarti anche: