Reputation: 1172
I am trying to move a file using java, from one folder to another folder, however the folders are on different hard drives, which fails to work with the renameTo method. I only need this feature to work on linux...
-jason
Upvotes: 1
Views: 3091
Reputation: 6423
If you want to move files on different file Systems. Copy and Delete.
Upvotes: 1
Reputation: 9903
Moving files between different filesystems requires you to copy them. The vanilla JDK doesn't have any method to do that, you'll have to do it yourself (e.g. by using FileInputStream / FileOutputStream).
Also check out this thread.
Upvotes: 2