After having automation to download a file from a specific website. How do I get UIPath to recognize that file, move its location, and change the name of the file? I am struggling to get this automation to do all that because I can’t figure out how to get it to recognize the current file it just downloaded. I see I can move files, but every time this automation runs, it will be a new file that will need to be downloaded to a specific folder and named.
Hi
What if you check ‘Ask where to save each file before downloading’ in browser settings?
Maybe then you got popup where you can define file name and location and problem with file recognition does not exists
@Primal, theres a activity called “Wait for Download”, inside it, you put the action that will make the download occurs and on the properties you will informe the folder where the file will be downloaded (normaly on User/Downloads).
Try to use this one, you will get not only the correct file, but directly access to its atributes.
@lucas.stern Alright, I have tried that. The next question is, what value goes into the “Downloaded file” field?
Would this be a custom code to inject at this point or am I just overthinking this?
Downloaded File will be your reference to the file you just download. Create a variable, and put it in there. Now, anythime you want to use this file (like moving it), you will use this variable.
@lucas.stern, this looking correct? I might be going at this completely wrong here.
Nope. On the Dowloaded File field click on “Create Variable”.
Ok. I am sure once my light bulb clicks on this one, I will feel embarrassed, but in the value, you can’t use the “movefile” since it’s not an expression. Sorry to keep bugging you on this one. @lucas.stern
Dont worry…
Think this way, this field (Downloaded File), is a output field. That means that the activity “Wait For Download” will give you something. This “thing” that the activity is giving you, you must store somewhere, you will store in a Variable.
So you must create a variable of the type that the thing the activity will give to you.
Oh, ok. I see now. Thank you for explaining. Makes more sense now. I was able to run the task successfully this time. Thank you for taking the time to explain this in detail to me. @lucas.stern
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.