Refer the below Scala code from my Github : https://github.com/saghircse/SelfStudyNote/blob/master/Scala/MoveRenameFiles.scala
You need to specify your source and target folder in main function:
val src_path = "" // Give your source directory
val tgt_path = "" // Give your target directory
It also rename files. If you do not want to rename files, then update as below:
val FileList=getListOfFiles(src_path)
FileList.foreach{f =>
val src_file = f.toString()
//val tgt_file = tgt_path + "/" + getFileNameWithTS(f.getName) // If you want to rename files in target
val tgt_file = tgt_path + "/" + f.getName // If you do not want to rename files in target
copyRenameFile(src_file,tgt_file)
//moveRenameFile(src_file,tgt_file) - Try this if you want to delete source file
println("File Copied : " + tgt_file)
}