VBS创建文件并设置权限的问题

2024-12-28 15:23:07
推荐回答(1个)
回答1:

Sub create(fso,path)
If fso.FolderExists(path) Then
Exit Sub
End If
If Not fso.FolderExists(fso.GetParentFolderName(path)) Then
create fso,fso.GetParentFolderName(path)
End If
fso.CreateFolder(path)
End Sub

Set fso = CreateObject("scripting.filesystemobject")
create fso,"c:/a/a/a/a/a/a/a/"
set fso = Nothing