Undo os.remove

Discussion in 'Python' started by chris.peressotti@gmail.com, Feb 13, 2007.

  1. Guest

    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, 2007
    #1
    1. Advertising

  2. Paul Rubin Guest

    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.
     
    Paul Rubin, Feb 13, 2007
    #2
    1. Advertising

  3. Ben Finney Guest

    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
     
    Ben Finney, Feb 13, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marco Liedekerken

    Undo in TextBox

    Marco Liedekerken, Jun 26, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,366
    Marco Liedekerken
    Jun 26, 2003
  2. john farrow

    How do I undo WebRequest.RegisterPrefix

    john farrow, Apr 13, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    848
    john farrow
    Apr 13, 2004
  3. tshad

    Undo formatting

    tshad, Apr 6, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    1,088
    tshad
    Apr 13, 2005
  4. Morgan Bachu

    How to "undo" a database delete

    Morgan Bachu, Aug 30, 2005, in forum: ASP .Net
    Replies:
    13
    Views:
    10,635
    James Doughty
    Aug 31, 2005
  5. Andreas Wachhold

    Undo/Redo Java?

    Andreas Wachhold, May 4, 2004, in forum: Java
    Replies:
    2
    Views:
    4,939
    Mykola Rabchevskiy
    May 4, 2004
Loading...

Share This Page