I am trying to move failed files to different directory(not copying, but moving).
originalfilename.renameTo(new File("C"));
It's giving me that renameTo is undefined for type String. Why am I getting this? Is there any other simpler API or statements to acheive this?
EDIT:How to move to different directory rather than creating a new file?