I have a File 'f' that I've just created, and I want to make it Hidden, so I use the following code:
Runtime.getRuntime().exec("attrib +H "+f.getCanonicalPath());
but it doesnt work in all cases, it appears to work only on famous folders like 'Desktop' folder, 'Documents' folder .. but on random folders like 'Desktop/randomFolder' it doesnt make the file Hidden.
Someone knows why and how can I solve this? The application is for Windows. Sorry for bad english.