I have a scenario where I need to hide my some folders which contain some files. I search a lot over the internet but did not get any good solution. I need to hide subfolders not the whole directory. Here is the code which I am using
Process _p = null;
try {
_p = Runtime.getRuntime().exec("attrib +H " + t.getPath());
_p.waitFor();
} catch (IOException | InterruptedException ex) {
java.util.logging.Logger.getLogger(newFrame.class.getName()).log(Level.SEVERE, null, ex);
}
where t = path tp that file
like C:\parentFolder\subfolder1\subfolder2\book.xml
I need to hide only subfolder1\subfolder2\book.xml
Please provide me some good solution.
Thanks in Advance.