Email Attachments With Date In Filename - Printable Version +- Ewon Technical Forum (https://techforum.ewon.biz) +-- Forum: Development (https://techforum.ewon.biz/forum-50.html) +--- Forum: BASIC Script (https://techforum.ewon.biz/forum-52.html) +--- Thread: Email Attachments With Date In Filename (/thread-1135.html) |
Email Attachments With Date In Filename - Quinn Mallory - 27-12-2019 Hello, I have an email item setup in the Planner that is successfully sending me data each day. I want to add the current date to the file name, but cannot figure out how to get it to work. Here is the working text file attachment [$dtHT$ftT$st_s86400$et_s0$fnDaily_Historical_Log_GroupC.txt$flC] Here is the closest I can figure should add in the Date, but it just cuts off after the "C_" [$dtHT$ftT$st_s86400$et_s0$fn"Daily_Historical_Log_GroupC_" + Date$ + ".txt"$flC] I have a Rule setup in Outlook that pushes these files to a shared drive, and have a spreadsheet setup with a graph and we can choose available files. But right now every file received has the same name, so they just overwrite each other. RE: Email Attachments With Date In Filename - simon - 29-12-2019 Hi, To do that you have to use the BASIC script instead of the Task planner. Ex (in init section): ONDATE 1, "0 0 * * *", "GOTO SENDDAILYMAIL" END SENDDAILYMAIL: A$ = TIME$ REM 19/12/2014 10:03:01 A$ = A$(1 To 2) + A$(4 To 5) + A$(7 To 10) + "_" + A$(12 To 13) + A$(15 To 16)+ A$(18 To 19) SENDMAIL "recipient@mail.com", "ccrecipient@mail.com", "MySubject", "[$dtHT$ftT$st_s86400$et_s0$fnDaily_Historical_Log_GroupC_" + A$ + ".txt$flC]" |