Converting the FileSystemObject's Type Property

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