myRecVideoFile = new File(fileName); if(!myRecVideoFile.exists()){ myRecVideoFile.getParentFile().mkdirs(); myRecVideoFile.createNewFile(); }