How to move/copy latest downloaded excel files?

I want to move/copy latest downloaded excel files to new folder that automation do?
What should I put in “Expression Editor” in order to get things done as it is.

Hi @Muhamad_Izwan_Bin_Hamran

In From give the file Path you want to move.
In to keep the destination path where to want to save.

Hope it helps!!
Regards,

Hi @Muhamad_Izwan_Bin_Hamran

Use this:
str_filepath = Directory.GetFiles(yourfolder_path,“*.xlsx”).OrderByDescending(Function(d) New FileInfo(d).CreationTime).Tolist(0)

This expression gives the latest downloaded .xlsx file in the folder.

Where should I put this action ?

Hi @Muhamad_Izwan_Bin_Hamran
Use Assign → str_filepath = Directory.GetFiles(yourfolder_path,“*.xlsx”).OrderByDescending(Function(d) New FileInfo(d).CreationTime).Tolist(0)
Give str_filePath in from

@Muhamad_Izwan_Bin_Hamran

If can use assign activity to store in path in the string variable and pass that variable to from.
or
Directly give this in from:
Directory.GetFiles(yourfolder_path,“*.xlsx”).OrderByDescending(Function(d) New FileInfo(d).CreationTime).Tolist(0)

image

What should I search in Search activities in order to get Assign ?

@Muhamad_Izwan_Bin_Hamran
Yes,Use Set Variable value

@Muhamad_Izwan_Bin_Hamran

Yes, use set variable value activity to assign the expression to a string value then pass that string variable into the “From” property.
Then choose the destination path in “To” property.

Try using the ‘Wait for Download’ Activity. This activity detects a file download initiated from any application and waits for the download to be completed before processing the file.

In the ‘Drop Activity Here’ add the activity that is responsible for the file download. Under the ‘Downloaded File’ option, write any name(eg:Filename) you want.

Now in the ‘Rename’ activity under the ‘From’ option, type Filename.FullName . This will give you the path of the downloaded file. Then add your desired destination location in the ‘To’ option.

image

What step did I missing here

@Muhamad_Izwan_Bin_Hamran

str_filepath must be a string variable.
Please show us the error

Hi @Muhamad_Izwan_Bin_Hamran

Can you show what is the error

@Muhamad_Izwan_Bin_Hamran
Can you show the full expression.

Make sure you can create a string str_filepath variable.
Directory.GetFiles(yourfolder_path,“*.xlsx”).OrderByDescending(Function(d) New FileInfo(d).CreationTime).Tolist(0)

Replace yourfolder_path with the downloaded path location.

Hope it helps!!

here is the error

image

@Muhamad_Izwan_Bin_Hamran

Please initialize the variable

@Brian_Mathew_Maben

Make sure you can create a string str_filepath variable.

Im new in studioX, can show me in details and how to create a string to variable.

image

@Muhamad_Izwan_Bin_Hamran

Please declare the variable by clicking the (+) icon and click create variable then give the variable name as str_filepath
image
image

I expression in place of folder_path give the downloaded folder path in “”

@Muhamad_Izwan_Bin_Hamran

create the variable using the create variable option by clicking the plus option

image

Hope it works!!