Export (0) Print
Expand All
Expand Minimize

Converting the FileSystemObject's Type Property


Windows PowerShell


Definition: Returns the type of file or folder, such as Text Document for a .txt file.

Type


There is no cmdlet to return this information, but you can use the Shell.Application object to find the type of a file:


$a = New-Object -com Shell.Application
$b = $a.Namespace("C:\Scripts")
$c = $b.ParseName("Test.ps1")
$c.Type


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