I would like to read and edit a .bat file by java, in case I have a .bat file that I want to open it in .txt to change, the method below is what I'm using
p>public void editarArquivo() throws SQLException, IOException{
DirControle dir = new DirControle();
String directory = dir.selectedDir_CB().toString().replace("[", "").replace("]", "");
Runtime.getRuntime().exec("notepad "+directory+"\"+getPasta()+"\"+getArchive());
}
where directory is the path of my file getPasta () is a folder before the file and getArchive () the file itself