Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim xdoc
- Function CreateFolders(objFile)
- Dim elem
- Dim attr
- set elem = xdoc.createElement("Folders")
- set attr = xdoc.createAttribute("Description")
- attr.value = objFile.Description
- elem.setAttributeNode attr
- set CreateFolders = elem
- End Function
- Dim FilePath
- Dim objFile
- Dim root
- Dim elem, elem1
- Set xdoc = CreateObject("MSXML2.DOMDocument.6.0")
- xdoc.appendChild xdoc.createProcessingInstruction ("xml", "version=""1.0"" encoding=""utf-8""")
- FilePath = "C:UsersUserDownloadsM.xml"
- set root = xdoc.createElement("Folders")
- xdoc.appendChild root
- strComputer = "."
- Set objWMIService = GetObject("winmgmts:" _
- & "{impersonationLevel=impersonate}!\" & strComputer & "rootcimv2")
- Set colFiles = objWMIService.ExecQuery _
- ("Select * from Win32_Directory Hidden = True")
- For Each objFile in colFiles
- Wscript.Echo objFile.Name
- Next
Add Comment
Please, Sign In to add comment