VBScript 之检测文件夹是否存在&不存在则创建【代码实现】
叮嘟!这里是小啊呜的学习课程资料整理。好记性不如烂笔头,今天也是努力进步的一天。一起加油进阶吧!
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/ee544ab366b0419728301c438bc29b2e.png)
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
Ending!
更多课程知识学习记录随后再来吧!
就酱,嘎啦!
注:
人生在勤,不索何获。