VB .net 如何检测一个文件或者文件夹是否存在。

2025-03-13 05:27:42
推荐回答(2个)
回答1:

If My.Computer.FileSystem.FileExists("c:\Check.txt") Then
MsgBox("File found.")
Else
MsgBox("File not found.")
EndIf

回答2:

My.Computer.FileSystem.DirectoryExists 这个是目录.....