VBS – CreateFolder with sub-dir’s (recursion)

Home Forums Scripting Windows Script Host VBS – CreateFolder with sub-dir’s (recursion)

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Avatar
    CaTBuS
    Member
    #155258

    I am having trouble writing a VBScript that will create a Folder with sub-directories (i.e. C:Folder1Folder2 where Folder1 does not yet exist). I know that I have to write a recursive method or loop. I have found many examples online but can’t seem to get any of them to work for me. Below is an example of what I would like to expand.

    Code:
    If Not objFSO.FolderExists(“C:Folder1Folder2”) then
    objFSO.CreateFolder(“C:Folder1Folder2”)
    End if

    As always, thanks in advance.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.