powershell order files by file extension in a folder code example
Example: powershell get all file extensions in directory
Get-Childitem -Recurse | Select-Object PSParentPath,Extension -Unique
Get-Childitem -Recurse | Select-Object PSParentPath,Extension -Unique