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

Converting the FileSystemObject's DriveLetter Property


Windows PowerShell


Definition: Returns the drive letter of the specified drive.

DriveLetter


See Drive. In PowerShell you use the same commands whether you’re returning a drive letter from a file, folder, or drive.


PS C:\scripts> Split-Path "C:\scripts " -qualifier
C:


Or, with the folder reference:


(Get-Item c:\scripts).fullname | Split-Path -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
Show:
© 2014 Microsoft. All rights reserved.