I have a a folder with the files: File1.txt and File2.txt
The contents of file1.txt are: "DTS053C0 RUN DATE 10/01/11 DATATRAK SYSTEM PAGE 001 RUN TIME 13:35:08 INPUT PROGRAM TRANSMISSION STATUS REPORT STATUS - INPUT RECEIVED BY DTCC'S DATATRAK SYSTEM DETAIL RECORDS RECEIVED 0 HEADER RECORD RECEIVED HDR.SSYSID.E00.CORIG.SSUBOMMDDYYYY HEADERFILEDESCRIPTION N001 * REJECTED NO MATCH ON EXPECTED MASTER FOR HEADER"
Contents of file2.txt are: "The confirm file received from DTCC will be in the following format: DTS053C0 RUN DATE 10/01/11 DATATRAK SYSTEM PAGE 001 RUN TIME 12:53:32 INPUT PROGRAM TRANSMISSION STATUS REPORT STATUS - INPUT RECEIVED BY DTCC'S DATATRAK SYSTEM DETAIL RECORDS RECEIVED 22 HEADER RECORD RECEIVED HDR.SSYSID.E00.CORIG.SSUBOMMDDYYYY HEADERFILEDESCRIPTION N001 * ACCEPTED Example"
I am looking for a batch script to scan through the contents of these 2 files separately and identify the files which contain the word "REJECTED" and then send an email to my email-id like a notification saying "this file has been rejected, kindly check".
- I am using blat to send emails as notifications *
Aucun commentaire:
Enregistrer un commentaire