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

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
taripo
Posts: 215
Joined: 01 Aug 2011 13:48

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

#1 Post by taripo » 11 Apr 2019 12:40

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.

aGerman
Expert
Posts: 3563
Joined: 22 Jan 2010 18:01
Location: Germany

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

#2 Post by aGerman » 11 Apr 2019 13:33

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

Post Reply