Hello,
I'm writing code that will populate a listbox with the contents of a folder (a list of excel and word files). Naturally, the listbox has all file names with the ".xls" or ".doc" extension included. How can I get rid of this? I have tried
fileName.Remove()
and
fileName.Replace()
functions with no success. I can not specify the length of the file name, as they are all different and constantly changing. The only thing I know for sure is that the last four characters need removed, and then the remaining string to be put in the listbox. Any suggestions? Thank you in advance for any help!