Export (0) Print
Expand All
Expand Minimize

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

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft