Hey, my code fragment is now this:
File fileName = "E:\\Major Project\\FinalLap\\278d.gz.txt.txt";
int index = fileName.toString().lastIndexOf("\\");
filed = fileName.toString().substring(0, index);
And I hope to just get the file's name "278d.gz.txt.txt" after the last instance of "\\" and assign it to variable "filed".
Can anyone tell me what am I doing wrong? Cause I'm still getting the full path.
Thanks a lot!