Answers for "powershell check if childitem is directory"

0

powershell check if childitem is directory

Get-ChildItem -Recurse -Path $pathSource | % {
    if ($_.PSIsContainer) {
        Write-Output "This is a directory, skip it"
    } else {
    	Write-Output "Do stuff"
    }
}
Posted by: Guest on January-18-2022

Code answers related to "powershell check if childitem is directory"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language