# 目录存在Test-Path $path -PathType Container[System.IO.Directory]::Exists($path)# 文件存在Test-Path $path -PathType Leaf[system.IO.File]::Exists($path)