How to get latest file from downloads files

I want to get latest downloaded file from downlods.How can i get it.

@nutan you can get a list of user’s Downloads folder files sorted by the creation time in descending order and then grab the first item of that list:

System.GetEnvironmentVariable Name: 'USERNAME' Value=> User
Folder.GetFiles Folder: 'C:\Users\\'+User+'\Downloads' FileFilter:'*' IncludeSubfolders:False FailOnAccessDenied:True \
SortBy1:Folder.SortBy.CreationTime SortDescending1:True SortBy2:Folder.SortBy.NoSort \
SortDescending2:False SortBy3:Folder.SortBy.NoSort SortDescending3:False Files=> Files
Console.Write Message: 'Most recently downloaded file: '+Files[0]
1 Like

Thanks a lot. It’s working perfectly.

1 Like