No announcement yet.

How to undelete file?

  • Filter
  • Time
  • Show
Clear All
new posts

  • How to undelete file?

    I wish to write a 32-bit program that undeletes deleted files,
    including reinstating their LFN's, if any.

    I am a licensed user of the McAfee Office 2000 software.
    However, I wish to be able to uninstall it and use my own
    programs. The only two functions I use from it are QuickCopy
    and Undelete. I've already written my own version of QuickCopy,
    and have it installed in my Windows Explorer's rightclick
    context menu and File Menu. Now, if I can only get the info
    I require to write my own version of Undelete, I can dump
    the McAfee stuff. While the McAfee stuff does those things, already,
    their software setup is EXTREMELY sloppy, and makes additions/changes
    to my Win98 SE that I have NO desire to put up with. It does that
    even if I tell the setup program to NOT install those options.
    Besides, I see no sense in having to install a full suite just to use
    two of its functions.

    So, if somebody can point me to the API calls I'd need to use to write
    my own Undelete program, it'd be greatly appreciated.

    Thanks in advance!

    P.S. I've already checked my win32.hlp file, and couldn't find any
    applicable API information.

    Clay C. Clear

    Clay Clear's Software
    mailto:[email protected][email protected]</A>

    [This message has been edited by Clay Clear (edited October 24, 2001).]

  • #2
    the system recycle bin seems to be the way to go unless you want to implement your own version.

    check out

    powerbasic support
    mailto:[email protected][email protected]</a>
    mailto:[email protected]


    • #3

      I use the Recycle Bin, *IF* I delete files with the Windows Explorer.
      What I would like the Undelete program for is to undelete files
      that have NOT been moved to the Recycle Bin (i.e., they were deleted
      by PB's KILL command, or at the DOS Prompt with the command
      processor "del" function, etc.)

      I'll go check out that link you posted in your reply.

      Thanks for your reply.


      Clay C. Clear

      Clay Clear's Software
      mailto:[email protected][email protected]</A>


      • #4
        I could be off-base here, but I believe that the old Norton's recycle bin + undelete hooks into the file system and intercepted all KILL-like activity and moved the files to it's own version of the "recycle bin".

        To work "outside" of the raw O/S behavior is a big task, say, if you want to be able to pick up the pieces of an O/S deleted file - especially with say NTFS (NT/Win2K), etc. Raw disk access in Windows is a problem in NTFS.

        Of course, writing your own delete function using the recycle bin instead of the PowerBASIC KILL statement will solve part of your problems, but as for files deleted with DOS or other apps? Hmmm...

        I'd try searching or for ideas or example code. Someone must have been down this road before.

        Good luck!

        PowerBASIC Support
        mailto:[email protected][email protected]</A>
        mailto:[email protected]


        • #5

          I "solved" my problem, but not in the way I had wanted. What I did
          was copy McAfee's Undelete EXE to my C:\PBDLL60\SAMPLES directory
          (which I have in my DOS Path). Then I kept running it until I
          stopped getting the Windows error message ( linked to missing
          DLL..." (to parphrase). For each time I got that, I copied the missing
          DLL to the aforementioned directory. Then, I completely uninstalled
          McAfee's stuff. Then I tested the Undelete, and it worked fine.

          I don't consider this "piracy", as I paid for the McAfee software myself,
          and have NO intention of giving the Undelete files to other people.
          In other words, i am still a "licensed" user.

          Yeah, the McAfee software also has a "hook" to deleting files, and
          moves them to the Recycle Bin. It even works with files being
          deleted with the command processor, ora DOS program. But, it slows
          down the system TERRIBLY, if I am doing mass deleting.

          Anyway, thanks for your help!


          Clay C. Clear

          Clay Clear's Software
          mailto:[email protected][email protected]</A>


          • #6

            You may wish to consider purchasing McAfee Office 2000. The
            Nuts'n'Bolts portion of it has the 32-bit Undelete function
            that I'm using. I'm warning you, though, that the suite really
            stinks, especially its setup when you first install it. It installs
            stuff that you specifically tell it to NOT install.

            I don't know what the latest version of it is written for. The version
            I have, I bought about 4 years ago, and was written for Win95 Win98
            (I'm running a Win98 SE machine).

            If I do get the info I need to write my own 32-bit Undelete, I will
            do so. You may wish to check my website, whose URL is in my
            signature below, every now and then. If I successfully write
            such a program, it will be a Public Release version (Freeware),
            and I will post it to my download sections, after I have COMPLETELY
            debugged it. Keep in mind, though, that I can ONLY test it on my
            own machine, which is using a FAT32 file system (note Lance's
            comments about Windows/NTFS file systems).


            P.S. I just realized that, if I do successfully write my own Undeleter,
            I will no longer need my licensed copy of the McAfee suite. In that
            case, I can snailmail to you my CD with it on it, as I will no
            longer require it. I am holding on to it until/unless such time so
            that I remain a "legitly licensed" user of it, since I'm still
            using the Undelete programs, even though I have uninstalled the suite.
            But, like I said, the disc is an older copy written for Win95/Win98.

            Clay C. Clear

            Clay Clear's Software
            mailto:[email protected][email protected]</A>


            • #7

              Look at BigBin.

              I found this years ago and it has helped me survive the
              loss of files under DOS or directly deleted many times.
              The only downside I found is that the Recycle Bin needs
              to be considered and emptied more often.

              See the link:

              It included C++ source and a great explanation at the time. If
              the link is inactive, please let me know. I still have the
              original download.

              Hope this helps.



              • #8
                A generic undelete handler for Windows and DOS will require extremely
                low-level disk manipulation and/or device drivers. This represents an
                advanced programming project and will require a considerable array
                of programming tools, knowledge and time. FWIW.

                Tom Hanlin
                PowerBASIC Staff


                • #9
                  Lance, Tom,

                  Thank you for your replies. I have considered them, and have decided
                  to not attempt to write my own Undelete. Although I wrote low-level
                  file undeletes on my lowly Commodore-64, it is an entirely different
                  animal than the PC & Windows. I believe that I have the programming
                  ability TO do it (my stupid questions posted on this BBS notwithstanding <grin> ),
                  I don't dare write it because the debugging of it would most likely
                  trash my HD repeatedly, and I would not be in favor of continuosly
                  having to reFDISK/reFORMAT my partitions. If there were API Calls
                  that would enable me to do it, then I would write it. But, since it would
                  involve very low-level programming, which I'm not at all familiar
                  with on PC's, I'll give up the idea.

                  Thanks, once again, for your replies. You have saved me a LOT of
                  research. I'll just continue to use the "borrowed" Undelete
                  executables from my McAfee suite.


                  Clay C. Clear

                  Clay Clear's Software
                  mailto:[email protected][email protected]</A>


                  • #10
                    Terry W Hough,

                    The link to the article works, but not the file download.

                    Would you mind emailing me the download? Thanks!

                    Colin Schmidt
                    [email protected]


                    • #11
                      Originally posted by Colin Schmidt:
                      [B]Terry W Hough,

                      The link to the article works, but not the file download.

                      Try this one: