Batch file to encrypt files and send email

My boss is working on a project which involves:

1. Checking a mapped drive (on an AS/400 machine), to see if there are any files in the directory.
2. If there are files then it needs to encrypt these files and copy them over to the windows machine which the batch file is running on.
3. The files will be named with a 3 letter abbreviation first followed by a unique number. The abbreviation signifies various companies and based on the 3 letter code it should send an email containing the encypted file to the company which matches the code.

This will be done on a scheduler and we are thinking that doing this in a command line batch file would be the easiest way to do it. I am told my boss has some kind of command line encryption tool but we have not tested it. We will need some sort of way to do the emailing portion of things though (a command line email client perhaps?). Any tips would be appreciated!

Who is Participating?
sgalzinConnect With a Mentor Commented:

Assuming you've got the encryption part taken care of, here's a tool you could use for sending an email from within a batch file :

Hope that helps,

StickyDragonAuthor Commented:
Sorry, I forgot to mention that the server will be Windows 2000. This one is for unix.
FishMongerConnect With a Mentor Commented:
You could use Blat it's a command line email program for Windows.

It should work for Windows : it has an .exe, an .ini, and everything you need !!

blat looks good also though :-)


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.