Hi all,
I have to read a CSV file which name is Temp31-10-2023 16_28_54.
The date and time keeps changing everything.
So how to read that file.
Thanks in advance
Hi all,
I have to read a CSV file which name is Temp31-10-2023 16_28_54.
The date and time keeps changing everything.
So how to read that file.
Thanks in advance
if it is in same folder and that is the latest file then you can use the below to get the file details
or use linq as below
requiredfilePath = String.Join("",Directory.GetFiles("FolderPath","Temp*.csv").OrderByDescending(function(x) New FileInfo(d).CreationTime).Take(1))
or
requiredfilePath = Directory.GetFiles("FolderPath","Temp*.csv").OrderByDescending(function(x) New FileInfo(d).CreationTime)(0)
cheers
Try with expression in a assign activity like this
Str_filepath = Directory.GetFiles("C:\YourFolderPath", "Temp*.csv")
.OrderByDescending(Function(f) New FileInfo(f).LastWriteTime)
.First()
This will give that filepath of that file which you can use in READ CSV FILE activity
Hope this helps
Cheers @hanviprebday
Thank you all its working
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.