Hi All,How to extract file name and copy to a excel column

I have multiple files with different names(for e.g. Search Company, By Company…etc.,), so i need to extract vendor name and paste it in a vendor column of excel file which i created.and i need to create this for every files what i receive and count of files also need to extract and paste it in other column as no.of files from particular vendor, it should be loop for every time

Thanks in advance.

  1. kindly assign GetFileDirectory i that pass the path where all files been located Directory.GetFiles(“path”)
  2. then loop the GetFileDirectory then you will get each file name from the path.
  3. inside loop to get file name use path.getFileName(item.ToString) and assign it
  4. To get File Count inside folder use GetFileDirectory.Count you will get total files.
  5. So you will get the FileName you can extract and paste in excel