vbs 创建多级目录方法

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

 

posted on 2010-09-20 11:01  Acor  阅读(491)  评论(0编辑  收藏  举报

导航