Hello,
My application crashes when I try to replace these characters "* \?" Yet I have to filter them under windows because it is impossible to create a directory with these characters. I am trying to replace special characters. But this is not working for me.
Here is my code
Code:
if(! query.getText().equals("")){
/ / Create the tree
pt = zept.getText();//+"/"+ requete.getText () / / tree management
File fb = new File(pt);
fb.mkdir();
rqnm = query.getText();
rqnm = rqnm.replaceAll(":","_");
/ / rqnm = rqnm.replaceAll ( "\ \ ","");
rqnm = rqnm.replaceAll("<"," ");
rqnm = rqnm.replaceAll(">"," ");
rqnm = rqnm.replaceAll("|"," ");
/ / rqnm = rqnm.replaceAll ("?"," ");
rqnm = rqnm.replaceAll("/"," ");
/ / rqnm = rqnm.replaceAll ("*"," ");
pt = zept.getText()+"/"+ rqnm; / / tree management
File fl = new File(pt);
fl.mkdir();
Please check the code and if you have any idea about it then please do post back.
Bookmarks