if (Test-Path -Path "C:/test/file.txt" -PathType Leaf) {
"The file exists."
} else {
"The file does not exist."
}
if (Test-Path -Path "C:/test/file.txt" -PathType Leaf) {
"The file exists."
} else {
"The file does not exist."
}
本文标题:【powershell】判断文件是否存在
本文链接:https://www.haomeiwen.com/subject/pnebwdtx.html
网友评论