Remove .ogg from files

December 28, 2010 at 11:45:45
Specs: Windows 7, Phenom 1055t/4gb
I Successfully batch converted many ogg files to mp3's. Problem is, lame.exe does not remove the ".ogg" extension from the original files. Example: "Battle_01.ogg" when converted comes out to be "Battle_01.ogg.mp3". I was wondering if there was some sort of script that can remove the .ogg characters from the files. Note that all files don't always have the same characters.


See More: Remove .ogg from files

Report •

December 28, 2010 at 13:59:50
Enter this command at the command prompt, while you are in the directory containing all the .ogg.mp3 files:

for %f in (*.ogg.mp3) do for %g in (%~nf) do ren %f %~ng.mp3

If you put this command inside a batch file, you must replace each % with %%. If your .ogg.mp3 files are in a number of subdirectories, it becomes more complicated.

Report •

December 28, 2010 at 15:06:42
Thankyou soooo much! Had multiple directories, but it didn't take long just to write a batch script to cd and execute the commands in the individual directories. Thanks alot, you saved me hours of trouble.

Report •

Related Solutions

Ask Question