I have formula: String.Join(“”, Directory.GetFiles(filePathName,“*”,SearchOption.AllDirectories).OrderByDescending(Function(d) New FileInfo(d).CreationTime).Take(1) )
I am using this formula in “Read CSV”
This formula worked on legacy, but for windows, it shows the error: “the parameter is incorrect”
Could you please help me with it? How can I resolve it?
Not really sure why the String.Join expression is used, we could also get the Latest file from the Folder/Sub Folders without the String.Join as well in the below way :
Directory.GetFiles(filePathName,"*",SearchOption.AllDirectories).OrderByDescending(Function(d) New FileInfo(d).CreationTime).FirstOrDefault