一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

VBS递归创建多级目录文件夹方法

时间:2022-09-22 编辑:坚强 来源:一聚教程网

今天为大家介绍的是关于VBS递归创建多级目录文件夹方法,感兴趣的小伙伴一起来看看吧。

核心代码

CreateFolders "d:jb51test12345" 

Function CreateFolders(path)
	Set fso = CreateObject("scripting.filesystemobject")
	CreateFolderEx fso,path
	set fso = Nothing
End Function

Function CreateFolderEx(fso,path)
	If fso.FolderExists(path) Then 
		Exit Function
	End If
	If Not fso.FolderExists(fso.GetParentFolderName(path)) Then
		CreateFolderEx fso,fso.GetParentFolderName(path)
	End If
	fso.CreateFolder(path)
End Function

经过测试运行没问题

以上就是关于VBS递归创建多级目录文件夹方法的全部内容了,感兴趣的小伙伴记得点击关注哦。

热门栏目