how to copy the same string and ignore the file directory path?
Like Below:
"C:\\Desktop\\Username\\filename\\filename" "D:\\Username\\filename\\filename\\filename" "E:\\Filename\\filename\\filename\\filename"
The Example:
string file = dialog.FileName;
string getfile = file;
if(file.Contains("Dangerous")) // Check the file Contains these word
{
string getfilename = file.Substring(3); //with this only available ignore C:\\ or D:\\
}
Output:
Dangerous_2018_09_10_1.csv
Please share any clue with me, Thanks.