I have an example PATH route:
C:\Users\ritchie\Documents\NetBeansProjects\Lavisa\build\web\upload\2.jpg
And I want to save it in:
C:\Users\ritchie\Documents\NetBeansProjects\Lavisa\build\web\imagenes
How can I copy that image to another directory with JAVA
?.
Hello Ricardo, it is easy to save the image with the File class
source: is the origin
target: is the destination
REPLACE_EXISTING : it is an option to replace the files in the destination folder if there are duplicates
font
https://docs.oracle.com/javase/tutorial/essential/io/copy.html