My problem is very simple and yet I can't figure out how to solve it. I have text files in a folder: "C:/aaa/bbb/ccc/ddd/test.txt" And excel files in a folder within the text files folder: "C:/aaa/bbb/ccc/ddd/excelFiles/test.xls" Both text and excel files have the same name.
I would like to be able to access the path of those excel files.
What I did is:
this.file.getParent()+"\\"+"excelFiles"+"\\"+file.getName().substring(0, fileName.indexOf('.'))+".xls"
I get a "String index out of range" error. Thank you for your help :)