PDA

View Full Version : *For command line pros only* (1) shntool (2) ape/flac/shn


roann
2006-02-25, 08:53 AM
Some days ago a guy contacted me and reported a problem using Trader's Little Helper. This problem only occurs if you're working with file names that are preceded by a "-". I tested a lot but now I'm really confused ...

Part One - using shntool

(1.1) File name: -Test.wav

Command: shntool len "-Test.wav"
Result: shntool [len]: error: unknown argument: -Test.wav
shntool expects Test.wav to be an option because of the "-".

Command: shntool len -- "-Test.wav"
Result:
length expanded size cdr WAVE problems filename
0:58.47 10342124 -b- -- ----- -Test.wav
0:58.47 10342124 B (total for 1 file, 1.0000 over all compression ratio)
Great, no probs. But ...

(1.2) File name: -Test.ape (or -Test.flac or -Test.shn)

Command: shntool len "-Test.ape"
Result: shntool [len]: error: unknown argument: -Test.ape
Sounds familiar, so: shntool len -- "-Test.ape"
Result:
length expanded size cdr WAVE problems filename
shntool [len]: warning: could not read data from file '-Test.ape' using the 'ape ' format module - possible causes:
shntool [len]: + decoder program 'mac' may not have been found - verify it is installed and in your PATH
shntool [len]: + this file may be unsupported, truncated or otherwise corrupt
0:00.00 0 B (totals for 0 files, 0.0000 overall compression ratio)

What's wrong?

Part Two - using mac.exe, flac.exe, shorten.exe

Now let's encode "-Test.wav" to ape, flac and shn.

(1) mac "-Test.wav" "-Test.ape" -c1000
--- Monkey's Audio Console Front End (v 3.99) (c) Matthew T. Ashland ---
Compressing (fast)...
And then ... nothing happens. BTW it works if you use the full path (e.g. mac "C:\-Test.wav" "C:\-Test.ape" -c1000), but if the file name is "Test.wav" it will work without the path too ... is there a way for "-Test.wav"?

(2) flac -0 "-Test.wav"
ERROR: (-T/--tag) field contains no '=' character
This works only with the full path (as above), but is there a way without the path?

(3) shorten "-Test.wav"
shorten: unknown option -T
This works only with the full path (as above), but is there a way without the path?

GregY
2006-02-25, 09:05 AM
Can you escape the dash? This guide might help:
http://www.tldp.org/LDP/abs/html/escapingsection.html

Or try posting your question in the flac forums at sourceforge (even though it's not flac specific.)

I'd like to know the specific answer also. :)