base64 encoding .txt file

Reply to Morris Dovey.

thanks for code, but i am not quite sure if i understand how i need to use this code.