Need help on read file with date code

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Leevan
Newbie
Posts: 9
Joined: Sun Jan 27, 2013 4:09 pm

Need help on read file with date code

Post by Leevan » Thu May 16, 2013 11:39 pm

Hi,

I have log files in date code folders, I need send log file via email.
My folder is like c:\autologs\20130515\backup.log

Code: Select all

ReadFile>c:\autologs\%date:~10,4%%date:~4,2%%date:~7,2%\backup.log,body

but MJT does not recognize date code.

Any work around?
Thanks,

Leevan

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Fri May 17, 2013 3:31 am

Try:
Year>yy
Month>mm
Day>dd
ReadFile>c:\autologs\%yy%%mm%%dd%\backup.log,body

Leevan
Newbie
Posts: 9
Joined: Sun Jan 27, 2013 4:09 pm

Post by Leevan » Fri May 17, 2013 4:06 pm

It works, thank you very much.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts