Move excel file from download to Another folder

Everyday im downloading report file from browser
For example: SampleFile_11/06/2022_11:22:00.xlsx
SampleFile_10/06/2022_14:34:00.xlsx
SampleFile_09/06/2022_18:56:00.xlsx
In download some many file are there(.txt, docx, xlsx…) But i want move particular latest download file that name starts with “SampleFile_” date and time will vary.

Kindly i want to move excel file from download to Another folder.

This should be in Help, not Feedback.

Use the Wait for Download Activity which gives you an output value of the file that was found, then you use that in a Move File activity.

1 Like

Try to do in this way, the click should be the selector of the download button from you browser

1 Like

Hi @T_Sujitha_Cognizant

Use below syntax in Assign activity:
latestFile = Directory.GetFiles(downloadsPath, "SampleFile_*.xlsx").OrderByDescending(Function(f) New FileInfo(f).CreationTime).FirstOrDefault()

Use Move File and in From give latestFile and in Destination give the folder where you want to move that file.

Hope it helps!!

That won’t account for waiting for the file to download, which the Wait for Download activity will.

1 Like

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