Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

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

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.