On error resume Next

Dim mu_sFilePath, mu_sFileName
mu_sFilePath = "textFolder/"
mu_sFileName = mu_sFilePath & "ResultVoice.txt"

Dim fs
set fs = CreateObject("Scripting.FileSystemObject")
if(fs.FolderExists(mu_sFilePath)) Then                     '检测文件夹是否存在
    MsgBox "文件夹已存在"
else
    MsgBox "文件夹不存在"
    fs.CreateFolder(mu_sFilePath)                           '创建文件夹
end if
set fs = Nothing

相关文章:

  • 2021-08-09
  • 2021-12-23
  • 2021-08-09
  • 2022-12-23
  • 2022-12-23
  • 2021-10-15
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-21
  • 2021-11-04
  • 2022-01-22
  • 2022-12-23
相关资源
相似解决方案