Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions src/main/java/pullrequest/ABC.java
Original file line number Diff line number Diff line change
@@ -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);
}
}
}
}