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.
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.