Page 1 of 1

Open always most recent file

Posted: Tue Aug 23, 2016 3:55 pm
by Rukbunker
Hello Oleg,

Short: Is there any procedure / action which always opens the most recent file in a certain folder?

Long: Every day we need to open a file like SDP {Day}-{MonthNo}-{year}. When it opens on a day, it should open the most recent one. In most of the case this is made the day before, so C:\Robotask\SDP\SDP {IncDays(-1)}-{MonthNo}-{Year} will do.
On a monday, he should open the file from friday, C:\Robotask\SDP\SDP {IncDays(-3)}-{MonthNo}-{Year} will do here as well. Works perfectly.

But, it could be that the person (who makes these reports now by hand) is on holiday. Then a -1, -3 or any other value can be wrong. In that case, he should open the most recent version, but...how can I do that in Robotask?

Re: Open always most recent file

Posted: Tue Aug 23, 2016 4:36 pm
by Oleg
Look at the demo task named "[DEMO] Find the latest/newest modified file in a folder"
You can find it here: http://robotask.com/tasks/Demo/%5BDEMO% ... older..tsk
Also you can find more examples here: http://robotask.com/samples/

Re: Open always most recent file

Posted: Tue Aug 23, 2016 4:38 pm
by Rukbunker
Oops, sorry. Got it! Thanks!