Hi, I would like to know how to check a file name in C # to check that it ends with a specific word (not only contains, but is at the end of the file name)
For example, I want to change some files that end with a Suffix Provider, so I want to check each file to see if it ends with a Provider, so LondonSupplier.txt, ManchesterSupplier.txt and BirminghamSupplier.txt will be checked and returned true but ManchesterSuppliers.txt will not be.
Is it even possible? I know that you can check the file name to check for a specific word anywhere in the file name, but is it possible to do what I suggest?
Terry source
share