diff --git a/src/main/java/pullrequest/ABC.java b/src/main/java/pullrequest/ABC.java new file mode 100644 index 0000000..5408c27 --- /dev/null +++ b/src/main/java/pullrequest/ABC.java @@ -0,0 +1,34 @@ +public class ABC { + private String var01 = ""; + private String var02 = ""; + private String var03 = ""; + private String var04 = ""; + private String var05 = ""; + private String var06 = ""; + private String var07 = ""; + private String var08 = ""; + private String var09 = ""; + + public static void increaseComplexity(String source, String target) { + File dir = new File(source); + File[] directoryListing = dir.listFiles(); + for (File file : directoryListing) { + String childName = file.getName(); + String childNameNew = ""; + for (int i = 0; i < childName.length(); i++) { + if (childName.charAt(i) == ' ') { + childNameNew += "-"; + } else { + childNameNew += childName.charAt(i); + } + } + String childDir = target + "\\" + childNameNew; + if (!(childNameNew.equals("")) && (file.renameTo(new File(childDir)))) { + file.delete(); + System.out.println(childName + " File moved successfully to " + childDir); + } else { + System.out.println(childName + " Failed to move the file to " + childDir); + } + } + } +}