Simple rename command question

March 10, 2010 at 13:59:31
Specs: Windows XP, AMD 9550
I have a bunch of files with more than one extension in the filename; e.g., song.flac.cue. I would like to use the batch file "ren" command to omit the ".flac" so the filename would be simply song.cue. However, nothing changes when I execute the command "ren *.flac.cue *.cue." What am I doing wrong?

See More: Simple rename command question

Report •

March 10, 2010 at 14:11:48

ren *flac.cue *.cue

Report •

March 10, 2010 at 14:12:37
You can use a free copy of TotalCommander for that.
It includes a muli renaming function, where you can say, search e.g. .flac and delete it from the filenames.

That works.

Download it from

Report •

March 10, 2010 at 16:43:05
paulsep, thanks for the tip, but I really want to do this in a batch file along with a handful of other automated file operations.

ace_omega, unfortunately I got the same results using the syntax you provided.

Any other ideas?

Report •

Related Solutions

March 10, 2010 at 17:21:53
@echo off & setLocal EnableDELAYedeXpansion

for /f "tokens=* delims= " %%a in ('dir/b *.cue') do (
set F=%%a
set F=!F:flac.=!
ren "%%a" "!F!"

Helping others achieve escape felicity


Report •

March 10, 2010 at 18:00:24
That worked. Thank you very much.

Report •

Ask Question