Any suggestions? Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
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

Show:
© 2016 Microsoft