So, I deleted a file using python. I can't find it in my recycling bin. Is there a way I can undo
it or something. Thanks in advance.
EDIT: I used os.remove
. I have tried Recuva, but it doesn't seem to find anything. I have done a deep search.
So, I deleted a file using python. I can't find it in my recycling bin. Is there a way I can undo
it or something. Thanks in advance.
EDIT: I used os.remove
. I have tried Recuva, but it doesn't seem to find anything. I have done a deep search.
If you used os.remove
and ended up deleting a file by accident, then there's no reason for this file to be in the recycle bin. It is removed from the filesystem. There is no Python operation to get that file back.
However, a simple deletion just breaks the link to the file but does not erase the bits of the file on the filesystem. You can try file recovery softwares to get it back.
Note that
Now that the file is erased, this question is not Python specific anymore. You'd be in the same situation if you had deleted the file by any other means.
You should avoid using your system to minimize the chances of erasing the bits of the file by writing another file at the same place on the disk.
The tools you can use to recover the file are platform specific and the generic question "how to recover deleted files" has most certainly already been asked here, on Super User, Unix & Linux, or some other Stack Exchange community.