Results 1 to 7 of 7
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Obtain files from Recycle Bin (Word97SR2)

    Has anyone written code to obtain files directly from the recycle bin?

    http://support.microsoft.com/default.aspx?...;EN-US;q165919& is a possible clue which I will investigate more fully.


    The file has been deleted
    The material (data) is still there
    And could be recovered if you knew which file to un-delete.

    How to discover which file should be undeleted?

    On method would be to read each deleted file in Binary mode and perform an InStr function on its data contents.

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Obtain files from Recycle Bin (Word97SR2)

    Chris,

    Check here too.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Obtain files from Recycle Bin (Word97SR2)

    Kevin, thanks for this resource. I'll be playing with it on and off this week.

    I hestitated to reply for a few days, because your message read "Check here http://www.mvps.org/vbnet/index.html?code/...m/shrecycle.htm to." and I was waiting for the other shoe to.

  4. #4
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Obtain files from Recycle Bin (Word97SR2)

    I fixed the post to "too". But too late to get to you. Two typos for "to" too often.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  5. #5
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Obtain files from Recycle Bin (Word97SR2)

    Here's where I've got so far (limited time)

    Bottom Line: tests.test3 is a SUB that displays contents of deleted files from the recycle bin. set the initial path to a drive and let'er'rip. This is close to my requirements, i.e. I'm almost done. I don't like the "C:Recycle" method, I'd rather get it from the registry but haven't worked out how (yet).



    Module SpecFolder is code cobbled from web sources. If nothing else DISPLAYALL shows meaningful constants for Win98SE/Word97SR2.


    Module recycle is an implementation of VBnet, Randy Birch.


    frm1 is associated with Module recycle; I have disabled the "Empty recycle bin" button.
    Attached Files Attached Files

  6. #6
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Obtain files from Recycle Bin (Word97SR2)

    Attached is a PkZipped RecycleBin.dot

    This work is incomplete. It obtains a directory of the recycle bin.

    I'd appreciate feedback or suggestions.


    It produces this
    <pre>C:RECYCLEDDC0.TXT is C:TestReadMe.txt
    C:RECYCLEDDC1.BAT is C:BATTEMP.BAT
    C:RECYCLEDDC2.BAT is C:BATERASE1.BAT
    C:RECYCLEDDC3.BAT is C:BATCURRENT.BAT
    C:RECYCLEDDC4.BAT is C:BATTEMP.BAT
    C:RECYCLEDDC5.BAT is C:BATERASE1.BAT
    </pre>


    from this:
    <small>
    <pre>
    Attached Files Attached Files

  7. #7
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Obtain files from Recycle Bin (Word97SR2)

    When a "deleted" file is removed from the recycle bin, Win98 clobbers the 'current" name - that's the "DC0.txt" sort of name. In this case the COLON will be absent.

    I think.

    The code update below takes me a little further along the path of understanding.


    <pre>Public Function Parse(strChunk As String, iStart As Long, strAr() As String)
    (snip!)
    ' i points to a null character
    ' If the second character of strCurrent is a colon, it has NOT been REMOVED
    If Mid(strCurrent, 2, 1) = ":" Then
    strAr(0, UBound(strAr, 2)) = strCurrent
    strAr(1, UBound(strAr, 2)) = strOriginal
    ReDim Preserve strAr(1, UBound(strAr, 2) + 1)
    Else
    End If
    </pre>


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •