Converting the FileSystemObject's SubFolders Property


Windows PowerShell


Definition: Returns a collection of all the subfolders of a folder.

SubFolders


In PowerShell, use the Get-Item cmdlet to retrieve a reference to the folder. You can then call the GetDirectories method to retrieve the collection of subdirectories.


(Get-Item C:\scripts).GetDirectories()


See conversions of other FileSystemObject methods and properties.
Return to the VBScript to Windows PowerShell home page

Show: