The problem with Binhex files was finding a good decoder. I found a program
called "BINHEX13.ZIP". It didn't seem to work. Instead of decoding the
files it re-encoded them. I found another program called "XBIN23.ZIP".
This one could decode them, but it always did split the file into 3 parts
(where the DAT file was the file I wanted). It worked, but I wasn't
satisfied with this solution. Once again I searched the net and discoverd
a different version of Binhex at:
ftp://coos.dartmouth.edu/pub/dos/Tools/binhex.exe
It looked a bit similar to the other Binhex program, but the difference
was that this one could be used in a batch file, while the other program
only worked interactive. This program worked fine when I tested it, but
failed when I tried to decode from Yarn. I found out that this was caused
by an emtpy line in the files that were produced by metamail. This was
quite anoying, and I began thinking of writing a small program to cut the
first empty lines from these files. But then I read the Metamail doc and
discovered that this problem could be solved by starting Metamail with
a '-e' option. Finally the Binhex problem was solved.
The other problem were the base64 encoded files. Metamail could decode
them, but I didn't like to be asked where to save TAA.AAA eeach time.
Metamail wasn't able to retrieve the correct filename, even though the
message contained MIME headers like:
--------------3F881B09EC
Content-Type: application/octet-stream
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="music.doc"
I searched the web for alternatives for Metamail, but couldn't find anything
useful. So I decided to write a small program that renames the file generated
by metamail. This program can be found at:
http://www.zeelandnet.nl/people/hneel/software/rentemp.zip
Here are some files I use. First my MAILCAP file:
text/plain; t %s
text/html; html.bat %s
image/*; image.bat %s
application/rtf; rtf.bat %s
application/mac-binhex40; binhex.bat %s
application/octet-stream; base64.bat %s
application/*; base64.bat %s
Here's BINHEX.BAT:
@echo off
cd \articles
binhex.exe c:\yarn\%1
cd \yarn
pause
And this is BASE64.BAT:
@echo off
cd \articles
rentemp c:\yarn\%1
cd \yarn
pause
I hope you may find this information usefule. And like I said before, I'm
still interrested to read about your solutions.
Hans Nelisse hneel@xs4all.nl
http://www.zeelandnet.nl/people/hneel/ hneel@zeelandnet.nl