Open the latest version of a file on the Web

Dear All,
I need to open a file in excel from a web page, but I require that you open the last file loaded. The file changes every day of name that is to say today it has a name of XXX24 Jan 2018 and tomorrow will change to XXX25 Jan 2018, how can I perform a task that opens the latest version?

Hi,
@juliansoria

you can concatenate the string
“XXX”+DateTime.Now.ToString(dd , MMMM , yyyy)

Thank you Lukas, could you show the steps by agree the secuence please, i appreciate.

Julian,
Define a new variable say fileName. Use Assign activity and Assign fileName = “XXX”+DateTime.Now.ToString(dd, MM, yyyy) like lukas mentioned.
Then, on the webpage where you’re using the Click activity to open the file, open its Selector Editor from properties. In place of ‘aaname =’ “xyz” put ‘aaname =’+fileName+
This will look for the dynamix file name every time.

Hope this helps.

Thank you very much kpanse110 and Lukas. I try the solution.

Dear All,

How I can modify the date? The fiel name original is: XXXX_25 JANUARY 2019, my sequense say XXXX_01-25-2019, how a can change the format date? My Assign is: XXXX"+DateString+“.xlsm”
Thank you very much for your support.

Use an Assign activity and place it before the Assign activity that you already have. In this, create a new variable with value “XXXX”+extractedDate.ToString(“MM-dd-yyyy”)+“xlsm”. Then attach this variable to the value of “DateString”. Hope this makes sense

@juliansoria
Can you please use this code
String.Join(“”,Directory.GetFiles(“FolderPath”,“FileType/FIleNameSequence”,SearchOption.AllDirectories).OrderByDescending(Function(d) New FileInfo(d).CreationTime).Take(1) )