So I made this algorithm where I add all Strings (filenames) from the console to an ArrayList, then I add the file part numbers to a TreeSet (lines 25 - 28) then to an ArrayList (line 29), then I iterate (lines 30 - 46) through the filename ArrayList to find the one which part number comes first by comparing it to the part-number Arraylist, then create the streams to copy the content, the output is correct on my pc with my files, but still doesn't validate :. - (