Chit Khine Chit Khine - 6 months ago 15
Java Question

Can we undo file.delete() function in java?

I was trying to delete some duplicate files in my folder which is around 230GB. Therefore, I searched for files with the names _2 or _3 and use the

file.delete();


However, it deletes the files that I wasn't expecting it. Can I undo that process or are those files deleted permanantly?

Answer

The Files are gone. See this Question below

http://stackoverflow.com/questions/11106850/using-javas-file-delete-method

So, about the workaround, If this was on windows, using recovery tools like "File Scavenger" might help you out.

Comments