Download and save excel file

Hi all

I want to export an excel file but it gets saved in pc downloads, I want to move this file to another folder & to do this in a loop. Pls help

1 Like

Use assign activity to initialize variable :
SourceFiles =Directory.GetFiles(“C:\Documents\SourceFiles”)

Take ForEach activity pass the SourceFiles variable to it

Use move file activity to move files from source to destination


Hope this will help you

Best regards,

1 Like

But in download folder other files are also downloaded which I don’t want to move…

Use if condition activity and put a condition as per your files extension

Do we have any function that can move the latest file

@Kajal_Sharma Do you mean latest downloaded files?

Yes…I want to export that file so it gets automatically saved in downloads folder of our pc…from there I want to save it to a specific folder.

@Kajal_Sharma That’s the process I have explained to you in the above post.
Put the path of download folder in Directory.GetFiles(path)

@Kajal_Sharma To download files from any portal you can use Screen scrapping.

Yes but I don’t know how to create a new excel each time plus screen scraping is not adding as an activity and this is just 1 step of my process

@Kajal_Sharma Could you please explain me what is your task I mean from where you are downloading the files ?

There is a website that has an export button so I am clicking on that button and excel is getting downloaded and getting saved in downloads
I want to move it from there and save in another folder

Hi @Kajal_Sharma,

If you are using Chrome browser just go to the setting and search “download” then enable “Ask where to save each file before downloading” option, so whenever you click export button pop up will appear, there you can give the folder path.


But I am exporting hundreds of files and can’t do this setting everytime

@Kajal_Sharma It is one time setting so you no need to set every time.

Ok il try… thanks

@aanandsanraj could you pls also tell that why it is taking time to click on a particular button and for other buttons it is clicking instantly


I hope this will help you

Click activity waits a long time before it is executed

Hi @Kajal_Sharma


Hope the below thread will help you :-

The above syntax will give you the latest downloaded files from the specified path.

After that same as @Vrushali_Gave has shown the Activity for how to Move those files to the required path

Mark as solution and like it if this helps you :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

1 Like

Hi @aanandsanraj
I have already made this change but still it is taking 30 sec to click
For further clicks it is clicking properly without delay