Hello guys,
I encountered a problem when using String.Join to get the latest file in folder.
There is a space between the file path folder and the file.
“U:\1202IE\DEPT\IE1 Section\Capacity\OFS\2020\ Fab1 OFS 20200731.xlsx”
________________________________________ ^
The code I use is
String.Join("",Directory.GetFiles(“U:\1202IE\DEPT\IE1 Section\Capacity\OFS\2020”,"*.xlsx",SearchOption.AllDirectories).OrderByDescending(Function(d) New FileInfo(d).CreationTime).Take(1) )
Thanks a lot.
5 posts - 3 participants