Export (0) Print
Expand All
Expand Minimize

Converting the FileSystemObject's GetDriveName Method

Windows PowerShell

Definition: Given a path, returns the drive letter.


Use the -qualifier parameter with the Split-Path cmdlet to return only the drive letter.

PS C:\scripts> Split-Path "C:\scripts\test.txt" -qualifier

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