File oldFile = getFile(filenames[row]); File newFile = new File(oldFile.getParent() + File.separator + name);  filenames[row] = name;  oldFile.renameTo(newFile);
if ( name.indexOf("..")<0 && name.indexOf("/")<0 && name.indexOf("\\")<0 ) { File oldFile = getFile(filenames[row]); File newFile = new File(oldFile.getParent() + File.separator + name);  filenames[row] = name;  oldFile.renameTo(newFile); }
    public void setFileName(int row, String name) {        File oldFile = getFile(filenames[row]);        File newFile = new File(oldFile.getParent() + File.separator + name);        filenames[row] = name;        oldFile.renameTo(newFile);    }