Compare Text File Before Send

Help
VAKO
2013-06-16
2013-06-17
  • VAKO

    VAKO - 2013-06-16

    Hello Friends,
    I Need your help, I couldn't solve this task...
    I have on the server one txt file "ChangeLog" I have configured the blat and it sends it without any problem (Batch file is run By Schedule task once a day) using this command "Batch File"
    "Blat.exe -Install -Server smtp.mailserver.com -Port 587 -f mymail@mailserver.com -u myuser -Pw mypassword
    Blat.exe -To mymail@mailserver.com -Subject "Data Changed" -Attachi "ChangeLog.txt" -Body "Changed Info"
    Is it possible to say the blat if the ChangeLog.txt is not changed inside not to send the mail?
    It is sending the same every day.... what to add to the string, please give me some advice I really need this

    Thank you in advanced

     
    Last edit: VAKO 2013-06-16
    • Anonymous - 2013-06-16

      Your email to Cor'e was automatically blocked as SPAM because correspondence with Cor'e requires his SPAM Key to be placed in the email body or Subject line.

      SPAM Key: =)

       
      • VAKO

        VAKO - 2013-06-16

        Thanks Christian for your answer, but I can't understand what you say or what to do

         
  • VAKO

    VAKO - 2013-06-16

    can you give me an example I'm really confused :(

     
  • Chip

    Chip - 2013-06-17

    In your batch file, you should have something like this:

    if not exist Change.bak goto sendit
    fc Change.txt Change.bak > nul
    if errorlevel 1 goto sendit
    goto eof

    :sendit
    "Blat.exe -Install -Server smtp.mailserver.com -Port 587 -f mymail@mailserver.com -u myuser -Pw mypassword
    Blat.exe -To mymail@mailserver.com -Subject "Data Changed" -Attachi "ChangeLog.txt" -Body "Changed Info"
    copy /y Change.txt Change.bak > nul

    :eof

     
    • VAKO

      VAKO - 2013-06-17

      Thank You Chip
      Worked Perfectly (Does What I needed)
      You're Super!

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks