Emnico in Swindon and its partners
in the UK and Europe provide:

» IT Support Services and Products
» Bespoke Software Development


Contact our Swindon office on:
+44 (0)1793 614 700
to discuss your IT needs.


CLOSE IT
Emnico Logo
Your Virtual Technology Team
Delivering Peak Performance
Category: Type: Order:
Search For:  
Home > Library > List All Folders

List All Folders

This script will return a list of all folders on a computer. This script can take a very long time to complete.
Added 283 days ago by Emnico
Download
Review
Back
53Views
This script has been successfully tested by Emnico and is verified to be working.

Source code

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colFolders = objWMIService.ExecQuery("Select * from Win32_Directory")

For Each objFolder in colFolders
    Wscript.Echo objFolder.Name
Next


| Privacy policy | Environmental policy | Site map |