Download and Move

I am using the “WAIT FOR DOWNLOAD” activity for the first time. I am still confused what’s the use of the “DOWNLOADED FILE” option where we create a variable which is “FileInfo” type.

I want to download an Excel from the Web and Move it to another folder which I created by using the “CREATE FOLDER” activity.

I could find the solution to this posted on the forum earlier but I want to understand it in simple language.

Thank You In Advance :pray:

FileInfo is an object that contains many different properties of the file, it’s not just the path and filename. Here is documentation on all the properties and methods.

If you want to get the path and filename for the Move File activity, then you use yourFileInfoVar.FullName

it will be great if you show it in a screenshot it will be easy to imagine

You can do it using like this:

Great!!! it worked.

So here I understood I don’t have to create any variable for “FROM” instead I have to use “DOWNLOADED FILE” in it.

Thank you so much.

Thank you for let us know

Yes. The Downloaded File is a variable of type FileInfo that holds information about the downloaded file like name, full path, extension, created date and so on. You can use it based on your requirements

Please mark some answer as solution to help others with the same doubt and to close the question

yes for sure, one last question!!

now after downloading and moving the file, I want to send the mail by SMTP which I have opened in the new XMAL. so in the attachment can I use the DOWNLOADED FILE variable?

I say no because the file now is in another folder and DownloadedFile hold old information about Downloaded Folder. What you can do is

Before move the file, assign a path to a string variable

MovedFilePath = "C:\Temp"+DownloadedFile.Name

In Move File, use this variable in “To” Field.

Assign the MovedFilePath to an out argument and give it as input argument to your SMTP workflow. Then add the input argument as value in Attach Files

Okay, I am trying to create a variable which will have directly the path of the downloaded file. The catch is, every time I run the automation the downloaded file name remains the same but it shows a NUMBER OF DOWNLOADS in bracket .eg. challenge(4).xlsx

So how shall I assign this path in a variable?

You don’t need to worry about the file name, the assign activity handle this for you:

MovedFilePath = “C:\Temp”+DownloadedFile.Name

DownloadedFile.Name will be the exactly name of the downloaded file, even it has (1), (2) at the end.

One good practice is, if you don’t use the file anymore after sent, you can remove it from disk using Delete File Activity and passing in_MovedFilePath after Send STMP mail activity


I will try this out immedietly

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.