mkdir(),mkdirs() returns false : I'm creating and deleting same folder continuously as a requirement. mkdir() creating some times correctly but some times creating operation failed file and mkdir() returns false. I have searched i got solution like change directory name before deleting,but I'm not deleting directory through android code .deleting is done by windows side.So, please any help..

          File file = new File(Environment.getExternalStorageDirectory() + File.separator + "eTestifyData" + File.separator + orgId + File.separator +
                     providerId + File.separator + datewise + File.separator + encounterId);
            if (file.exists()) {
                write(file, file.getAbsolutePath(), jsonData);
            } else {
                if (file.mkdirs()) {
                    write(file, file.getAbsolutePath(), jsonData);
                } 
            } 