In this tip you will learn how to create subfolders if they don't exist.
Sub subCreateFolders(strPath)
If Right(strPath, 1) <> "\" Then
strPath = strPath & "\"
End If
strNewFolder = ""
Do Until strPath = strNewFolder
strNewFolder = Left(strPath, InStr(Len(strNewFolder) + 1, strPath, "\"))
If objFSO.FolderExists(strNewFolder) = False Then
objFSO.CreateFolder(strNewFolder)
End If
Loop
End Sub
You can now call this with a Folder path.
Call subCreateFolders("D:\599CD\Downloads\vbs\")
And the folders will be created if they don't already exist.