Blame lame.bat

Packit 47f805
@echo off
Packit 47f805
rem  ---------------------------------------------
Packit 47f805
rem  PURPOSE:
Packit 47f805
rem  - put this Batch-Command on your Desktop, 
Packit 47f805
rem    so you can drag and drop wave files on it
Packit 47f805
rem    and LAME will encode them to mp3 format.
Packit 47f805
rem  - put this Batch-Command in a place mentioned
Packit 47f805
rem    in your PATH environment, start the DOS-BOX
Packit 47f805
rem    and change to a directory where your wave 
Packit 47f805
rem    files are located. the following line will
Packit 47f805
rem    encode all your wave files to mp3
Packit 47f805
rem     "lame.bat *.wav"
Packit 47f805
rem  ---------------------------------------------
Packit 47f805
rem                         C2000  Robert Hegemann
Packit 47f805
rem  ---------------------------------------------
Packit 47f805
rem  please set LAME and LAMEOPTS
Packit 47f805
rem  LAME - where the executeable is
Packit 47f805
rem  OPTS - options you like LAME to use
Packit 47f805

Packit 47f805
	set LAME=lame.exe
Packit 47f805
	set OPTS=--preset cd
Packit 47f805

Packit 47f805
rem  ---------------------------------------------
Packit 47f805

Packit 47f805
	set thecmd=%LAME% %OPTS%
Packit 47f805
	lfnfor on
Packit 47f805
:processArgs
Packit 47f805
	if "%1"=="" goto endmark
Packit 47f805
	for %%f in (%1) do %thecmd% "%%f"
Packit 47f805
	if errorlevel 1 goto errormark
Packit 47f805
	shift
Packit 47f805
	goto processArgs
Packit 47f805
:errormark
Packit 47f805
	echo.
Packit 47f805
	echo.
Packit 47f805
	echo ERROR processing %1
Packit 47f805
	echo. 
Packit 47f805
:endmark
Packit 47f805
rem
Packit 47f805
rem	finished
Packit 47f805
rem