When I use the line of code as below , I get an string array containing the entire path of the individual files .
private string[] pdfFiles = Directory.GetF
You can simply use linq
Directory.EnumerateFiles(LoanFolder).Select(file => Path.GetFileName(file));
Note: EnumeratesFiles is more efficient compared to Directory.GetFiles as you can start enumerating the collection of names before the whole collection is returned.