Help To create Folder1/Folder2 in Windows using VBScript ( Both the folders not exists before, i mean to create multilevel folders @ a strech.)

前端 未结 4 843
既然无缘
既然无缘 2020-12-11 01:39

I have created folders using my VBscript. when i give a folder path, the script is creating only the last folder, if the last but one folder does not exists, it will fail...

4条回答
  •  眼角桃花
    2020-12-11 01:56

    Late to the show, but the Shell.Application object works for me in XP, as follows ...

    with CreateObject("Shell.Application")
      set oFolder = .NameSpace("C:\")
      if (not oFolder is nothing) then oFolder.NewFolder("a\b\c\d")
    end with
    

提交回复
热议问题