Your technology certification is waiting. Enroll in Cloud Class ®
strRootFolder = MyGetFolder("Please select your root folder", "C:\")
If strRootFolder = "" Then WScript.Quit
strRootFolder = strRootFolder & "\"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Call MyCreateFolder(strRootFolder & "folder1")
Call MyCreateFolder(strRootFolder & "folder1\folder1a")
Call MyCreateFolder(strRootFolder & "folder1\folder1b")
Call MyCreateFolder(strRootFolder & "folder2")
Call MyCreateFolder(strRootFolder & "folder3")
If Not objFSO.FolderExists(strFolder) Then
Function MyGetFolder(strMessage, strRootPath)
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.BrowseForFolder(WINDOW_HANDLE, strMessage, NO_OPTIONS, strRootPath)
On Error Resume Next
MyGetFolder = objFolder.Self.Path
On Error Goto 0
Open in new window
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
This course teaches how to install and configure Windows Server 2012 R2. It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).