Page 1 of 1

How do I get an extension if the filename has two dots?

Posted: 16 Aug 2020 09:19
by PiotrMP006
How do I get an extension if the filename has two dots?

ex.

Test.aaa.txt

%~r1 -> aaa.txt

Please help me

Re: How do I get an extension if the filename has two dots?

Posted: 16 Aug 2020 09:48
by ShadowThief
Why would .aaa.txt be the extension instead of just .txt? What if you had A.File.Name.Like.This.2020.HEVC.x265.mkv?

Also, %~r doesn't work because %~r isn't a valid variable substitution command. %~x gets the extension.