if you want to send a file, why not use DCC SEND?
much easier to send that pic of the big fish you caught on your last hunting trip than writing your own file sending script.