public void copyFile(String copyFrom,String copyTo){
        File file1 = new File(copyFrom);
        File file2 = new File(copyTo);
        try {
            if(!file1.exists()){
                throw new SecurityException();
            }
            if(file2.exists()){
                System.out.println("The file you are trying to write to already exists - would you like to overwrite it (y/n)");
                String response = System.console().readLine();
                if(response.equals("y")){
                    duplicate(file1,file2);
                } else if(response.equals("n")){
                    System.out.println("Exiting progam - nothing done");
                } else {
                    System.out.println("Invalid selection - exiting program");
                }
            } else {
                duplicate(file1,file2);
            }
        } catch (SecurityException ex) {
            System.out.println("This file does not exist: " + file1);
            ex.printStackTrace();
        }
    }