Lame Batch Convert, Simple Batch Convert Command |
![]() ![]() |
Lame Batch Convert, Simple Batch Convert Command |
Jul 23 2012, 20:13
Post
#1
|
|
|
Group: Members Posts: 1 Joined: 23-July 12 Member No.: 101679 |
Hello everyone!
I need a little help to write a simple batch file that can do the following: Convert any .wav files in a directory to mp3 using the original file name and delete the original .wav file when complete. This directory will always have a .wav file that is recording, so when the script hits the "file in use" error, it needs to skip it and move on. I plan to take the batch file and have windows run it automatically on an hourly schedule. My original plan was to run: C:\filepath\lame.exe" --preset cbr 256 d:\filepath\*.wav But Lame will only encode a single file and then exit. Also not sure how to delete the original .wav file when complete.. Ideas? Thanks! |
|
|
|
Jul 23 2012, 23:59
Post
#2
|
|
![]() Group: Members (Donating) Posts: 762 Joined: 12-March 05 From: Kiel, Germany Member No.: 20561 |
Try this:
Create a file called encode_and_delete_wav.bat, open it in an editor and add the following: CODE for /R %%f in (*.wav) do ( "C:\filepath\lame.exe" --preset cbr 256 "%%f" "%%~dpnf.mp3" del %%f ) Deploy the file into the folder where the WAV files reside, or edit the parameter *.wav describing the set, accordingly. I'm not sure whether it will skip the WAV file being written to, try it. This post has been edited by Kohlrabi: Jul 24 2012, 00:01 -------------------- Audiophiles live in constant fear of jitter.
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 21st May 2013 - 12:16 |