【 解 説 】
ファイルやディレクトリが存在するかを調べるには、System.IO.File.Exists()を使用します。
【 例 文 】
1 2 3 4 5 |
If System.IO.File.Exists(fileName) = True Then MessageBox.Show(fileName & " exists.") Else MessageBox.Show(fileName & " does not exist.") End If |
■お薦め参考関連資料
Microsoft、Visual Studio、Visual Basic、Visual C#、Windows Vista、Windows Server、SQL Server、Visual C++、Visual Web Developerは、米国 Microsoft Corporationの米国及びその他の国における登録商標または商標です。