I have this code:
%a%
represents a folders name e.g. "TEST123"
for %%a in (*) do rename "%%a" "%%a-%a%"
The function above renames all the files in that folder by appending the file name with the folders name e.g.
FromWater.avi
Towater.avi-TEST123
This issue is that I want the ".avi" to be at the end.
Is there a way to get rename to rename but 4 letters in.