Like I am having Req_250: a Req_6497: b Sysreq_234 a Here I want to put-> "COLON" instead of ":" and "_" instead of " " How to that please give idea
Like I am having Req_250: a Req_6497: b Sysreq_234 a Here I want to put-> "COLON" instead of ":" and "_" instead of " " How to that please give idea
You can used File renameTo() to rename your file
such as
File file=new File("../path/Req_250: a Req_6497: b Sysreq_234.docx");
boolean renameResult = file.renameTo(new File(file.getParent()+"/"+file.getName().replace(":", "COLON").replace(" ", "_")));