Open always most recent file

Discuss RoboTask here
Post Reply
Rukbunker
Posts: 194
Joined: Mon Feb 22, 2016 4:06 pm
Location: Netherlands

Open always most recent file

Post 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?
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Open always most recent file

Post 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/
Oleg Yershov
Rukbunker
Posts: 194
Joined: Mon Feb 22, 2016 4:06 pm
Location: Netherlands

Re: Open always most recent file

Post by Rukbunker »

Oops, sorry. Got it! Thanks!
Post Reply