Undo os.remove

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • chris.peressotti@gmail.com

    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

  • Paul Rubin

    #2
    Re: Undo os.remove

    chris.peressott i@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.

    Comment

    • Ben Finney

      #3
      Re: Undo os.remove

      chris.peressott i@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

      Comment

      Working...