I am currently creating a directory based on file names and then moving the files into the new directories. At the moment i am creating the new directories fine using the following code:
String filename = filesInFolder.get(i).toString();
File fullPathFile = new File(filename.replaceAll("(\\w+)_(\\d+).*", "$1/$2/$0"));
fullPathFile.getParentFile().mkdirs();
Then i am trying to use InputStream
and OutputStream
to move the files to the new directories, the code is ok it seems but when i create the new directories, all the folders are set to read-only
so i cannot move the files into the knew directories
So is there a way to set the folders to read-write
when they are created?