Hi. I want to extract a string before the last symbol in a file path “” for an example path “C:\Users\AAAA\Downloads\Testfile.xlsx” but keep getting to after the last symbol using this InputPath.Substring(InputPath.LastIndexOf("")+"".Length).Split(Environment.NewLine.ToCharArray)(0) which returns the string Testfil.xlsx. Can anyone suggest a correct command please?
did u need to extract the filename from filepath given ?
No just the filepath before the last \ given
Can u provide an example of the data u need to extract , i am still not cleared
use this method
This will give the output like this
Inputpath.substring(0,(Inputpath.lastindexof(""))) can also be used.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.