Why can't i make a directory using "user.dir" and mkdir??? Always returns "Directory not made"
public static void workFlow(String input){ File input1 = new File(input); System.out.println(input1.getName()); String fileName = input1.getName().substring(0, input1.getName().lastIndexOf(".")); File dir = new File(fileName); System.out.println(dir.mkdir()); System.out.println(fileName); String currentDirectory = System.getProperty("user.dir"); String newDirectory = currentDirectory + File.separator + fileName; File f = new File(newDirectory); boolean file = f.mkdirs(); System.out.println(currentDirectory); System.out.println(newDirectory); System.out.println(file); if(file){ System.out.println("Directory made"); System.out.println("The current directory is: " + currentDirectory); }else{ System.out.println("Directory not made"); } }