this line worked fine till today, I started to get the error message “Where is not a member of string”…I need to loop through all excel files not starting with ~ at the beginning of the file
Directory.GetFiles("C:\Users\lynn.song\Desktop\Attachments","*.xlsx",SearchOption.AllDirectories).Where(Function(s) not System.IO.Path.GetFileName(s).StartsWith("~"))
Hi,
Try this
Directory.GetFiles(“C:\Users\lynn.song\Desktop\Attachments”,“*.xlsx”,SearchOption.AllDirectories).Where (Function(s) not System.IO.Path.GetFileName(s).StartsWith(“~”))
System.IO.Directory.GetFiles("C:\Users\lynn.song\Desktop\Attachments","*.xlsx",SearchOption.AllDirectories).Where(Function(s) not System.IO.Path.GetFileName(s).StartsWith("~"))