Created
January 12, 2025 04:27
-
-
Save CN-CODEGOD/d293c7a0ce16a395456d1923d08654a5 to your computer and use it in GitHub Desktop.
powershell 判断路径是文件夹或文件
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $param=$home | |
| PS> (Get-Item $param -isnot [System.IO.DirectoryInfo]) | |
| false | |
| PS> (Get-Item $param -is [System.IO.DirectoryInfo]) | |
| true | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment