For example if type
cmd.exe echo %1 it shows the filename and extension of the selected file. But what I want to do is just get the extension of the selected file by itself.
Does anybody know how?
You can do this in Powershell easily, using the Extension attribute.
One example (Although many more methods to accomplish this are possible:
And in cmd.exe: