rename part of a file

September 24, 2010 at 04:35:27
Specs: Windows XP
i'm writing a batch program to convert audio files it is working but i now need to make it rename to a certain .ext without specifying the extension
i can do this but if i convert

test.mp3 -> test.wav
i get

the file works but i just need to stop it from putting in the.mp3 part in the new filename

i am using the input as the new filename but as i said it gives test.mp3.wav

See More: rename part of a file

Report •

September 24, 2010 at 05:42:15
cool beans great script

Helping others achieve escape felicity


Report •

September 24, 2010 at 06:20:15

Report •

September 24, 2010 at 07:34:46
SeanyC111: ????????
Allow me to rephrase Mechanix2Go's post: You're asking a question without context. It's the equivalent of walking up to a person on the street and asking, "What color?" Provide more details; provide the script.

Or, as I'd normally say: Now pretend we're not standing over your shoulder, and we can't see what you're pointing at.

Report •

Related Solutions

September 24, 2010 at 07:56:05
sorry bout dat
this is my program

@echo off
setlocal enabledelayedexpansion
color 02
title Sox File to .WAV Converter

echo Either type in file and location or drag and drop

echo To convert to a directory type: C:/location/my converted file.ext
echo Do not use C:\ does not work!

echo If you want to convert into the same dir as file been converted,
echo drag and drop same file to convert to and change \ to /

: lets program take input
set INPUT=
set /P INPUT=Convert: %=%

echo sox is converting...

sox %INPUT% "%INPUT%.wav" rate -v 44100

echo conversion complete!

echo Press any key to exit...
pause >null

this program works in conjunction with another so it wont run by itself
its just to automate a command line based converter.

so my question is:
can i get rid of the .mp3 in the file name with having to do it manually?
(hows that?)

Report •

September 24, 2010 at 10:22:07
Hi SeanyC111,

If you want rename a file (with extension) ;

ren file.txt file.doc

I hope I did helped you.

Kind Regards,


Report •

September 24, 2010 at 10:57:42
sox %INPUT% "%INPUT%.wav" rate -v 44100


for %%a in (%INPUT%) do set OUTPUT="%%~DPNa.wav"
sox %INPUT% %OUTPUT% rate -v 44100

Report •

September 27, 2010 at 03:37:12
sound razor
this was really a big help thanks so much

Report •

Ask Question