Skip to navigation
Get file modification time and put the date into the email body with autohotkey
21.09.15
foo.ahk: FileGetTime, modtime,\\192.168.1.230\foo$\bar\BG\B.csv Sleep,100 FormatTime, time_str, %modtime%, d.M.yy hh:mm:ss tt FormatTime,completed FileRead, Contents, mailparam.txt Sleep,100 StringReplace, Contents, Contents, @@MODTIME@@, %time_str%, All StringReplace, Contents, Contents, @@COMPLETED@@, %completed%, All Sleep,100 FileDelete, mailparam2.txt Sleep,100 FileAppend, %Contents%, mailparam2.txt Sleep,100 Run, C:\0_Scripts\mail.exe /p:mailparam2.txt mailparam.txt smtpserver = mailserver.com from = mailserver.com to = foo1@bar,foo2@bar.com subject = foo.ahk foo.csv(@@MODTIME@@) body = foo.ahk script has finished on : @@COMPLETED@@ body = body = Script that run was : foo.ahk body = body = B.csv Modification Time: @@MODTIME@@ body = attachment = \\192.168.1.230\foo$\bar\BG\B.csv
http://www.autohotkey.com/docs/commands/FileDelete.htm
Reply
Anonymous
Information Epoch 1714424071
Store numerical data in flat files.
Home
Notebook
Contact us