How to read files from folder

read 3 files based creation of date in descending order hello.xaml (17.3 KB)

Directory.GetFiles(folder_inside_path,".",SearchOption.AllDirectories).OrderByDescending(Function(d) New FileInfo(d).CreationTime).Take(3)

1 Like

addd .Take(3) at the end

1 Like

getLatestExcel.xaml (12.2 KB)

Can anyone help me resolving this error. There is issue in type casting. I am trying to get single file name with path which is latest/very new/fresh from downloads folder.

1 Like

@viraj_thakrar Your “excelfile” variable type is String. Change it to IEnumerable.

2 Likes

Yes. Its working perfect now. I am able to get latest single file from folder. Thank you @ovi. Thank you guys.

1 Like

how to get that file from ienumerable type?

Hi. Go to the variable type and browse for other types . There you can find the ienumerable option.