There is a task to copy a bunch of folders into one folder, there are identical files \ folders in these folders, and I need to copy them with replacement, please tell me.
- You have already figured out how to choose which of the 2x identical files to keep? - Nofate ♦
|
1 answer
Use the java.nio.file.Files::copy(path1, path2, copyOption) with the StandardCopyOption.REPLACE_EXISTING option.
|