本帖最后由 pcl_test 于 2016-8-19 22:47 编辑
1、- Set fso = CreateObject("Scripting.FileSystemObject")
- Set ws = CreateObject("WScript.Shell")
- folder = ws.ExpandEnvironmentStrings("%HOMEPATH%")&"\00"
- If fso.FolderExists(folder) Then ws.run "cmd /c md """&folder&"\11""", 0
复制代码 2、- Set fso = CreateObject("Scripting.FileSystemObject")
- Set ws = CreateObject("WScript.Shell")
- folder = ws.ExpandEnvironmentStrings("%HOMEPATH%")&"\00"
- 'If fso.FolderExists(folder) Then fso.CreateFolder(folder&"\11")
- If fso.FolderExists(folder) Then md(folder&"\11")
-
- Function md(ByVal folder)
- If right(folder,1) <> "\" Then folder=folder&"\"
- arr = Split(folder, "\")
- subfolder = arr(0)
- For i = 1 To UBound(arr)-1
- subfolder = subfolder & "\" & arr(i)
- If Not fso.FolderExists(subfolder) Then fso.CreateFolder(subfolder)
- Next
- End Function
复制代码
|