What is the simplest way to get the file name that from a path?
string filename = \"C:\\\\MyDirectory\\\\MyFile.bat\"
In this example, I s
I would do it by...
Search backwards from the end of the string until you find the first backslash/forward slash.
Then search backwards again from the end of the string until you find the first dot (.)
You then have the start and end of the file name.
Simples...