Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

Converting the FileSystemObject's GetParentFolderName Method


Windows PowerShell


Definition: Returns the full path to the parent of the given path. For example, the parent folder name of C:\Scripts\temp is C:\Scripts.

GetParentFolderName


Use the -parent parameter of the Split-Path cmdlet:


Split-Path C:\scripts\temp -parent


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:
© 2015 Microsoft