469,362 Members | 2,427 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,362 developers. It's quick & easy.

Undo os.remove

Hi. I just used os.remove to get rid of some files -- unfortunately,
I realized afterward that I didn't really want to get rid of them. It
isn't life-or-death, here, but is there any way for me to get these
files back?

- Chris

Feb 13 '07 #1
2 4983
ch**************@gmail.com writes:
Hi. I just used os.remove to get rid of some files -- unfortunately,
I realized afterward that I didn't really want to get rid of them. It
isn't life-or-death, here, but is there any way for me to get these
files back?
Try a websearch for file recovery utilities, nothing to do with Python
especially. "Directory Snoop" by Kent Briggs is supposedly pretty
good if you run Windoze.

One thing you should do is shut off your computer right away if it's
the same one where you deleted those files. If the freed disk sectors
get re-used by other files they are unrecoverable, and Windows is
always doing stuff that eats up disk sectors. Use a different
computer to search for recovery programs.
Feb 13 '07 #2
ch**************@gmail.com writes:
Hi. I just used os.remove to get rid of some files --
unfortunately, I realized afterward that I didn't really want to get
rid of them. It isn't life-or-death, here, but is there any way for
me to get these files back?
Since 'os.remove' delegates the actual removal to your operating
system, it's a matter of whether your operating system has a way to
get those files back.

Most operating systems don't have a simple "bring this file back"
system call (the way they have a "remove this file" system call), so
Python can't provide such an interface. But your operating system
might provide a way.

--
\ "Reichel's Law: A body on vacation tends to remain on vacation |
`\ unless acted upon by an outside force." -- Carol Reichel |
_o__) |
Ben Finney

Feb 13 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Lyn | last post: by
reply views Thread by wizard of oz | last post: by
1 post views Thread by Jeremy | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.