|
'create the foloder
Sub AddNewFolder(path, folderName)
Dim fso, f, fc, nf,msg,fso1
Set fso = CreateObject("scripting.FileSystemObject")
Set f = fso.GetFolder(path)
Set fso1= CreateObject("scripting.FileSystemObject")
Set fc=f.SubFolders
If not (fso1.FolderExists(path&folderName)) Then
'msgbox "exists "
' Else
msg= MsgBox ("create the folder?", 4, "not find the test folder!")
If msg=6 Then '6yes,7no
Set nf = fc.Add(folderName)
End If
' Else
' Set nf = fc.Add("New Folder")
'End If
End If
End sub
Dim te,te1
'ExecuteFile "C:\CreateFolder.vbs"
te="e:\"
te1="test"
Call AddNewFolder(te,te1) |
|