Page 1 of 1

how do I rename *.3gp.mp4 to *.mp4?

Posted: 11 Apr 2019 12:40
by taripo
how do I rename *.3gp.mp4 to *.mp4?

so e.g. aaa.3gp.mp4 should be aaa.mp4

E:\blah>rename *.3gp.mp4 *.mp4

E:\blah>move *.3gp.mp4 *.mp4
The filename, directory name, or volume label syntax is incorrect.

E:\blah>

none of those commands are renaming the files.

Re: how do I rename *.3gp.mp4 to *.mp4?

Posted: 11 Apr 2019 13:33
by aGerman
Use FOR loops and the format specifiers of FOR variables.

Code: Select all

for %%i in (*.3gp.mp4) do for %%j in ("%%~ni") do ECHO ren "%%~i" "%%~nj%%~xi"
Remove the ECHO if it outputs the right commands.

Steffen