[Wine] Questions about BAT

GamezR2EZ wineforum-user at winehq.org
Thu Sep 18 16:22:58 CDT 2008


Alright, i have been trying for a while now to do the following, i have googled up and down, searched this forum and the like.
I have a .bat file that i created to help me convert my music. The problem i have is the .bat file calls an .exe and sends it several parameters. Here is an exerpt of it:

~~~~
If ~%1 == ~ GOTO end



C:\Music\Lame_Encoder\lame.exe -b 320 -F -h %1 "%~d1%~p1%~n1 - 320.mp3"


~~~~

What this does in windows is checks to see if parameter 1 (usually a file i drag-n-dropped onto the .bat file) exists [If ~%1 == ~ GOTO end] then, if it does exist, finds lame.exe [C:\Music\Lame_Encoder\lame.exe] and then the options for lame [-b 320 -F -h] and finally the file to convert [%1] and converted file name ["%~d1%~p1%~n1 - 320.mp3"] (prior meaning ~Drive~\~PathofOriginalFile~\~NameofOriginalFile~ - 320.mp3)

This works excellent in windows, i just drag over several files and it outputs .mp3's to the original file's folder.

This does NOT work so well with wine. For various reasons i need to use this .bat and .exe file (mainly for file consistency between linux and windows). The end game i want it to be able to goto the command promt, drag-n-drop the .bat file over to it, then drag the files i want to convert to the promt as well.

The lame.exe and .bat file are currently in my '/home/~username~/.wine/drive_c/Music/Lame_Encoder/' folder, so the bat file should be looking in the right place.

One thing i have found to work is opening a terminal and drag-n-droping the lame.exe file, typing -b 320 -F -h then draging the .wav file from a different directory over. The command looks like this...

'/home/~username~/.wine/drive_c/Music/Lame_Encoder/lame.exe' -b 320 -F -h '/home/~username~/Desktop/311 - Amber.wav'

that outputs exactly like i want, one mp3 in the directory '~/Desktop' named '311 - Amber.mp3'

can anyone help me create a working .bat or other script so i can send more than one file with the options '-b 320 -F -h' to the lame.exe so i can setup a few files to convert and walk away?

Thanx for anyone who tries to help!

PS yes its a long post, but i would rather people post like this so i know all the factors then a post that really vague and i have to ask a bunch of basic questions







More information about the wine-users mailing list