Question: how to move file from one folder to another in java example?
Answer: File.renameTo() package com. mkyong. file; import java. File; public class MoveFileExample { public static void main(String[] args) { try{ File afile =new File("C:\\folderA\\Afile.txt"); if(afile. renameTo(new File("C:\\folderB\\" + afile. ...  Copy and Delete. package com. mkyong. file; import java. File; import java.