Help - Search - Members - Calendar
Full Version: Lame Doesn't Support Wildcards. Why?
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - Tech
Old Nick
This is something that used to bother me a lot. Nowadays I use RazorLame and it's not a problem anymore.

But I still don't understand why? It's a command-line encoder, why doesn't it support wildcards?
Chun-Yu
Probably because under *NIX OSes, wildcards are expanded BEFORE calling the program, so I bet LAME under Linux, for example, would work just fine with wildcards. Nifty? Yes, but sometimes it gets annoying wink.gif. Wildcards with LAME only don't work for us "lame" Windows users (hey, I use Linux and Windows, and I like both - each has its own strengths and weaknesses).
andy2kxp
Actually that is false, wildcards are interpreted by the program, not the shell, lame doesn't support wildcards because it can only deal with one file at a time, there was, and i think there still is, a shell script that would allow you to encode multiple files.
Cameleon
As mentioned before, you can use a Perl script called LameB to encode multiple files from the command line.

QUOTE
Actually that is false, wildcards are interpreted by the program, not the shell, lame doesn't support wildcards because it can only deal with one file at a time, there was, and i think there still is, a shell script that would allow you to encode multiple files.


Actually, it's not false. In dos, wildcards are passed to the program to deal with. On Unix-like systems, the shell is expected to expand the wildcards to a list of files, and the program has to be able to deal with a list of files. I found this quote here:

QUOTE
On DOS systems when you issue a command such as DEL *.pas to delete all the files in the current directory which have the extensiun .pas the character sequence *.pas is passed unchanged to the DEL command which includes the necessary code to examine the directory and identify the relevant files. This means that if you want to write your own programs to manipulate sets of files identified by wildcards you will have to write the relevant code, although most DOS compilers will provide library routines to do most of the work.

On a Unix system it is the responsibility of tbe command interpreter (or shell) to examine the user input and convert the wild card expression to a list of file names which are then passed to the selected command. This means that wildcard expansion is doen cosistently, it also means that if you want to write your own programs that will work with wildcards all you need to do is to expect a list of file names.
Chun-Yu
Thanks, Cameleon! After reading andy2kxp's reply mad.gif, I was afraid that I'd have to dig up the documentation to support my statement about wildcards, but you've already done it for me sleep.gif! As I said, I use Linux and Windows (and Solaris, Irix, MacOS, etc. B)) so I'm absolutely sure that wildcards in *NIX are expanded by the shell, NOT the program. The program doesn't even get a chance to see what wildcards were used. Perhaps, as andy2kxp's name suggests, he's been using Windows XP a little too much :'(? Please stick to commenting about things you know about/are sure about ph34r.gif (or at least stick an "I think" in there if you aren't sure if what you're saying is absolutely true).

In general, it's definitely true that it's much easier for *NIX programs to support wildcards than DOS/Windows programs since the *NIX shell expands them for you - you just have to handle each filename in the list it gives you.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.