Hi there,
If you believe in using the right tool for the job, I wouldn't use the base64 web page on my site... It'll always just generate one output based on all the input, not separated out the way you need.
If I were you, I'd use PowerShell for this kind of task. It's fairly straightforward to put together a simple PS script that generates the base64 value from text on the command line, then you can just use a PS command to read in the file and pipe line-by-line to your script.
For instance, here's a simple file:
PS> get-content test.txt
This is line 1
This is line 2
Some more text
I've got a script called encode-texttobase64 that takes one command-line parameter - the text to encode - and it base64 encodes it and outputs the result. So here's running the script, getting one base64 encoded value per line:
PS> get-content test.txt | %{ encode-texttobase64 $_ }
VGhpcyBpcyBsaW5lIDE=
VGhpcyBpcyBsaW5lIDI=
U29tZSBtb3JlIHRleHQ=
It's pretty straightforward. I can give you the PowerShell scripts for encoding and decoding from the command line, but I thought you might relish the opportunity to create them yourself first (although they're really trivial).
BTW, I've never used LDIFDE, so I don't know if this does exactly what you want or if there's some other hurdle you need to overcome.
Good luck!
Geoff