I want to automate a process in which I have to download a bunch of files and store it in a specific folder.
Each day, I access a website in which all the reports are listed in a .tsv format, ordered by date. The thing is, I only want to download the newest file in the list.
I’ve created a process to download all the files I need but I don’t know how to do it dynamically.
Basically, this is my file selector for each file:
<webctrl aaname=‘a_b_c_2019-01-10.tsv’ parentid=‘content’ tag=‘A’ />
As you can see, the file name always has the date associated with it. Is there a way for me to dynamically select the download link based on the aaname and the system’s today date-1 or any other options?
Thank you all in advance.
Just follow steps
1.use assign activity
Temp = “<webctrl aaname=‘a_b_c_”+now.adddays(-1).tostring(“yyyy-dd-mm”)+".tsv’ parentid=‘content’ tag=‘A’ />"
Use Temp in selector of your current activity.
Ps- Temp is string type of variable
I got the following error:
“Compiler error(s) encountered processing expression “temp”.
‘temp’ is not declared. It may be inaccessible due to its protection level.”
Click on variable pane and create new variable of string type name that variable “Temp”
if u have created the variable and using it in a sub sequence of the same XAML, Try changing the scope of the variable.
“The selector is not valid”
Thanks anyway :’(
Just replaxe (yyyy-dd-mm) to (yyyy-dd-MM)
Try below selector
"<webctrl aaname='a_b_c_"+now.adddays(-1).tostring("yyyy-MM-dd")+".tsv' parentid='content' tag='A' />"
This worked like a charm! Thanks a lot!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.