Select todays excel file from specific location uipath

Hi @Abx9

First create a directory variable with DirectoryInfo type ex directorylocation

directorylocation = new DirectoryInfo("your excel file directory")

Then you have to create a another array variable with FileInfo type. ex newly_created_files

newly_created_files = directorylocation.GetFiles(".xlsx").Where(function(file) file.LastWriteTime.Date=DateTime.Now.Date).OrderByDescending(function(d) d.LastWriteTimeUtc).ToArray

Today created files are stored in newly_created_files

Pass this array variable inside a for each activity incase if multiple excel files was created today

Or else

If you have single excel

Create a variable with Genericvalue Type ex MyExcelFile

MyexcelFile = newly_created_files(0).ToString

Hope it solves your issue

And update us whether you got your desired solution or not

Thanks
Robin

3 Likes