(Get-Item c:\scripts\test.txt).extension Note that, unlike GetExtensionName, the Extension property includes the dot in the name. In other words, the preceding command will return.txt, not simplytxt. See conversions of other FileSystemObject methods and properties. Return to the VBScript t...
Definition: Given a file name or full path, returns the file extension of the file (without the .). GetExtensionName In PowerShell, you can use the Get-Item cmdlet to retrieve a reference to the file, then check the Extension property:...