These folders will be created on a daily basis. I have a flow which download PDF reports to respective folders daily. Instead of using Click activity and indicate on screen to save these PDFs is there another way to save the reports dynamically?
Just to add I used Create Folder activity and input the current date as part of the directory name.
Here’s what I understand from your question:
There are folders that are created daily and those folders have the same, as listed in the image, with the current date appended to each of them. You want to know how you can save the reports dynamically to those folders instead of interacting with the user interface (Click activity) to accomplish this?
I think the only piece of information I’m missing to most accurately answering your question is how you are downloading these PDFs/what application you’re using.
I will presume you are downloading them from a website in a browser which is easily analogous to a lot of other situations. The assumption I am going to make is you have a Save As dialog which allows you to navigate to the directory before saving the file.
I am unaware of what your current flow is, but you have said that you use the create folder activity and input the current date as part of the directory name. You can assign the current date to a variable and/or pass it out as an argument, you want that dynamic data stored in a variable so that you can use it later to easily save the PDFs to the respective folder.
I am unsure how you are currently navigating to the directory to save these daily reports. However, as an alternative you could use the Click activity, change the click type property to a RIGHT CLICK and the element/selector should be the Save As dialog address toolbar. Then, you can add a second activity to click the menu item ‘edit address’, which in my experience, has yielded the best experience across Win7/10 for properly focusing/activating that input field before typing.
In summary, I’m unsure why you’re using a Click activity to download a file (PDF) unless it’s being saved after using a ‘Save As’ dialog. If you are, you can still use a click, but to get to the folder you need to dynamically you need to utilize the current date stored in a variable and then your logic/conditions should yield the correct file being used to download to the correct folder.
I’ve attached some pseudo code that I developed to illustrate what I’ve described HERE------>betta_question-forum.zip (5.3 KB)
. Most of the activities have been annotated to reflect any changes I made to the properties of the activity. Please let me know if you have any questions/concerns or if you can provide me further information or clarify any of my misunderstandings I may be able to provide some better assistance.
Edit: I posted this and thought of another idea. If you are using a save as dialog but have the option/are not using one where a file is downloaded automatically to a folder (for example: Chrome default setting is to download to Downloads folder and not prompt a Save dialog) then you can MOVE the file to the folder “dynamically”.
hi @garett ! thank you for such detail explanation. i get what you mean… i’ll have a go at your xaml file… really appreciate the informative solution! many thanks!