Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: My Batch File... (Read 3614 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

My Batch File...

There are some problem when I use front-end to convert file, so I use batch file to convert wav to mp3..
Filename : batenc.bat or batenc.cmd
=======================begin=========================
@ECHO OFF
if '%1'=='enc' goto enc
if '%1'=='wav' goto wav
if '%1'=='kill' goto kill
if '%1'=='' goto nothing
if '%1' NEQ '' goto nothing

:enc
cls
REM --------------------You can change lame options here--------------------
REM example : lameenc = lame --alt-preset fast standard --nogap
REM ------------------------------------------------------------------------
SET lameenc=lame --nohist --alt-preset fast extreme --scale 0.93 --ns-bass -6 -X3 -d -m j --nogap
REM ------------------------------------------------------------------------

ECHO.
ECHO Start Encoding Wave Files To Mp3 Files.........
ECHO.
FOR /R %2 %%i IN (*.wav) DO (echo. & echo. & %lameenc% "%%~fi" & ren "%%~fi" "%%~ni.bak")
echo.
echo.
GOTO end

:exit
echo.
echo.
ECHO Thanks for using the batch file.
goto x

:wav
cls
ECHO Recorvering .wav files.....
FOR /R %2 %%i IN (*.bak) DO (ECHO Recovering "%%~nxi" & ren "%%i" "%%~ni.wav")
ECHO Finished !!!
goto x

:nothing
ECHO.
ECHO ** Batenc : a batch file of converting wave files to mp3 files. **
ECHO                                                              SawFish 2002/08/26
ECHO Usage : batenc option path .
ECHO.
ECHO options :
ECHO  enc : To conver wav files in the directry (include sub dir) to mp3 files.
ECHO        And mp3 file will be placed in the directry where the origenal wav
ECHO        file is.
ECHO  wav : Recover wav file.
ECHO        when .wav files have been converted to mp3 files, it will be renamed
ECHO        to .bak files, you can use this option to recover the .bak files to
ECHO        origenal .wav files in this directry (include sub dir).
ECHO  kill: Kill all mp3 files in this directry (include sub dir).
ECHO.
ECHO  example :
ECHO            batenc enc (This will process current directry, include sub dir)
ECHO            batenc enc wavfiles\
ECHO            batenc enc D:\music\wavfiles\
ECHO            batenc wav D:\music\wavfiles\
ECHO            batenc wav (This will process current directry, include sub dir)
ECHO.
ECHO  *** Your lame.exe must be in path.***
ECHO  *** If you don't know what the path is, just put it in windows directry.***
goto x

:end
REM ren wav mp3
ECHO Finished !!!
ECHO And the .WAV Files have been renamed to .Bak Files
goto exit

:kill
cls
ECHO.
FOR /R %2 %%i IN (*.mp3) DO (ECHO "%%~nxi" is deleted... & del /q "%%i")
ECHO.

:x
=======================end==========================


My Batch File...

Reply #2
I like the whole KISS policy.

When I decide to actually encode from a batch file rather than using a frontend for an encoder, I just do a VERY simple DOS batch file.

i.e.

LAME --alt-preset standard file1.wav
LAME --alt-preset standard file2.wav
LAME --alt-preset standard file3.wav
LAME --alt-preset standard file4.wav

My Batch File...

Reply #3
Quote
I like the whole KISS policy.

When I decide to actually encode from a batch file rather than using a frontend for an encoder, I just do a VERY simple DOS batch file.

i.e.

LAME --alt-preset standard file1.wav
LAME --alt-preset standard file2.wav
LAME --alt-preset standard file3.wav
LAME --alt-preset standard file4.wav

What is 'KISS' ?
sic transit gloria mundi...

My Batch File...

Reply #4
Quote
What is 'KISS' ?

Keep It Simple, Stupid.

My Batch File...

Reply #5
Indeed.

 

My Batch File...

Reply #6
Hey boys,
lameb doesn't just convert a bunch of wavs to lame, it also creates directories and filenames of definable schemes for you and adds id3v1 and id3v2 tags.

If you don't want to encode albums of music or at least have your mp3s sorted in a special way then surely lameb is overkill...
sic transit gloria mundi...