These are the codes that I have tried
Dim myDirectory As new.IO.DirectoryInfo("C:\MyFolder")
Dim myFiles() As String = myDirectory.GetFiles.OrderByDescending(Function(x) x.LastWriteTime).Select(Function(x) x.FullName).Take(40).ToArray
MsgBox(String.Join(Environment.NewLine, myFiles)
Here since I am giving Take(40), it will be taking only last 40files, but I want which can take all files which are modifies in last 24hrs(it may be 100 or 1000)
If you want to find all the files that were modified in the last 24 hours you can use a StudioX activity to loop through each file and then use the LastModifiedDate method to find the data they were modified.
First, you will need to click Show StudioX activities in the Activities window filter.
Then, select the For Each File in Folder activity.
After that, use this formula in the If activity: Convert.ToDateTime(CurrentFile.LastModifiedDate()) > Now.AddDays(-1)
In this example, the name of any file that was modified in the last 24 hours will show up in a message box.