Search code examples
filebatch-filebatch-rename

How do I remove extension for renaming purposes?


I have code that looks like this

%original%-added.txt

So if the original filename is

blue.txt

My code modifies that blue.txt file and the new file is then named

blue.txt-added.txt

How can I remove that first ".txt" so that I only get

blue-added.txt


Solution

  • Try like this :

    %original:~0,-4%-added.txt