Imports System.IO
Module Module1
Sub Main()
' 定义文件夹路径和文件名
Dim cDrivePath As String = "C:\"
Dim templetsFolderPath As String = Path.Combine(cDrivePath, "Templets")
Dim testFileName As String = "TEST.xlt"
Dim testFilePath As String = Path.Combine(templetsFolderPath, testFileName)
' 判断Templets文件夹是否存在,如果不存在则创建
If Not Directory.Exists(templetsFolderPath) Then
Directory.CreateDirectory(templetsFolderPath)
Console.WriteLine("Templets文件夹已创建")
End If
' 判断TEST.xlt文件是否存在,如果不存在则创建
If Not File.Exists(testFilePath) Then
' 这里可以添加创建TEST.xlt文件的代码
' 例如,可以使用File.Create方法创建一个空文件
File.Create(testFilePath).Close()
Console.WriteLine("TEST.xlt文件已创建")
Else
Console.WriteLine("TEST.xlt文件已存在")
End If
Console.ReadLine()
End Sub
End Module