How can I rename the file and move in new excel sheet with rename with saheer name

Hello guys,

In above image I’m downloading one by one files

  1. continue screening 2) watchlist screening 3) watchlist updated downloading all three file but in above image and which I mentioned the names that are changes sometimes only 1 is there/ like only (Watchlist added is there)

After download the files I have to change the file name and move that which I’m creating new excel file

File name format below image

And i want all whichever element name exist on web page what i mentioned in Excel sheet

Above image I mentioned the sheet names in that format should be paste

Thanksemphasized text

@suraj_gaikwad

use Rename file activity

and use Move file activity to move the renamed file

hope this helps

cheers

Hi @suraj_gaikwad

To rename the file you can use the rename file activity.
To move the file you can use the Move file activity.

Hope it helps!!

@Shiva_Nikhil
@mkankatala

This exception occurred

Show the error you are getting took screenshot and attach in your reply @suraj_gaikwad

I have attached already above image

@suraj_gaikwad

can you check the source file path above the rename activity

if the file is downloading then you need to place a delay so that the activity will work

cheers

I have already use wait for download.

I have checked in local so file is getting in that variable which I passed in rename

@suraj_gaikwad

what iam saying is after downloading the file place a delay above rename file activity

so that the rename file activity will get the filepath it will not show any error

the error it is showing source file doesnot exists

cheers

@Shiva_Nikhil
Same error occurred after using delay activity

@suraj_gaikwad

can you share the image of the filepath which you are passing in the rename file

cheers

@Shiva_Nikhil

Thanks

I have to rename the new downloaded files

@suraj_gaikwad

sourcefilepath=Directory.GetFiles(“Folderpath”,“*.xlsx”).OrderByDescending(Function(f) new FileInfo(f).CreationTime).First

try this syntax you will get the recent downloaded file,change the extension as per your requirement like “*.pdf” or “.*doc”

happy automation

@Shiva_Nikhil

When I’m passing the variable in assign form wait form download this error showing

@suraj_gaikwad

ok use

system.io.Directory.GetFiles(“C:\Users\cogni\Downloads”,“*.xlsx”).OrderByDescending(Function(f) new FileInfo(f).CreationTime).First

Same error

@Shiva_Nikhil

@suraj_gaikwad

type the syntax

in the assign dont copy and paste

system.IO.Directory.getfiles(“Folderpath”,“*.xlsx”).orderbydescending(Function(x) new Fileinfo(x).creationTime).first

use it above rename activity below wait for download activity

@suraj_gaikwad

use the same syntax which is mentioned below

sourcefilepath=system.io.Directory.GetFiles(“C:\Users\suraj.gaikwad\Downloads”,“*.xlsx”).OrderByDescending(Function(f) new FileInfo(f).CreationTime).First