I want to remove certain text from the Args, if the args contain that text.
args[1] = "C:\Users\Public\Roaming\Intel\Wireless\Settings\guids.xml"
I want to remove "\guids.xml" if the args[1] contains it. I tried something like below but of no luck.
if (args[1].ToUpper().Contains("GUIDS.XML"))
{
args[1] = args[1].Replace("GUIDS.XML","");
}
Trying for an output like args[1] = "C:\Users\Public\Roaming\Intel\Wireless\Settings"
Note: I converted the input args to uppercase because I don't know how it was on the users machine.
I really appreciate any kind of suggestions.