Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: DOS and the Recycle Bin  (Read 4360 times)

0 Members and 1 Guest are viewing this topic.

AndyCountry

    Topic Starter


    Rookie

    Thanked: 1
    DOS and the Recycle Bin
    « on: July 28, 2008, 10:38:41 PM »
    Patio.........help!!

    I accidentally deleted an msdos.sys file from the root directory. Of course my machine boots only to the C:> prompt now.

    I can't believe that 6 hours of searching the Web has resulted in no productive solutions....

    Problem: Using the dir c: doesn't show me the Recycle Bin.. what is the filename for it?

    This box is running 98SE. Not sure which version of DOS it's running.

    Many thanks in advance!

    gpl



      Apprentice
    • Thanked: 27
      Re: DOS and the Recycle Bin
      « Reply #1 on: July 29, 2008, 02:32:31 AM »
      If you delete a file using DOS, it doesnt go to the recycle bin

      However, all may not be lost, you should be able to 'undelete' it.

      If your machine is not bootable now, go to bootdisk.com and download a DOS image, run it to expand it (you will need a 1.44Mb floppy) - it will create a bootable floppy.

      Leave the disk in your working computer and search download.com (other download repositories are available) for undelete. Pick one that works under DOS (pretty much any ver will do) and put it on the floppy.

      Now stick the floppy in your dead pc and boot it (make sure the floppy is on the list of drives that can boot the pc). when you get to the A:> prompt, change to c: and run the undelete program from the a: drive.

      Just thinking about it, if you download the win98SE boot image, you might just be able to boot the pc with the floppy and do
      sys c:
      which will copy the important files to your hard disk - but try the undelete first

      Good luck
      Graham

      AndyCountry

        Topic Starter


        Rookie

        Thanked: 1
        Re: DOS and the Recycle Bin
        « Reply #2 on: July 29, 2008, 11:44:42 AM »
        Graham - thanks for the reply.

        I was in Windows when I deleted the file.

        I had recently started experiencing some weird computer behavior from time to time I had run all anti spyware/virus/registry fixing utilities that I own - to no avail.

        So I was rooting around the root directory when I noticed 3 versions of the "msdos" file residing there.

        The 3 versions were: "msdos.sys" (which is fine), "msdos.---" (that's right, the file extension was 3 dashes).. I can't remember the last strange "msdos" file's extension, but it was not ".sys" as it should be.

        I checked the root directories of my other 3 machines and found no such odd  files...only "msdos.sys".  I thought that I could move "msdos.---" to the Recycle Bin and then move it back if there was a major problem... obviously I was wrong!

        I must put that exact file back into the root directory...using DOS.

        Thanks for your help.

        BC_Programmer


          Mastermind
        • Typing is no substitute for thinking.
        • Thanked: 1140
          • Yes
          • Yes
          • BC-Programming.com
        • Certifications: List
        • Computer: Specs
        • Experience: Beginner
        • OS: Windows 11
        Re: DOS and the Recycle Bin
        « Reply #3 on: July 29, 2008, 01:02:03 PM »
        Graham - thanks for the reply.

        I
        The 3 versions were: "msdos.sys" (which is fine), "msdos.---" (that's right, the file extension was 3 dashes).. I can't remember the last strange "msdos" file's extension, but it was not ".sys" as it should be.

        I checked the root directories of my other 3 machines and found no such odd  files...only "msdos.sys".  I thought that I could move "msdos.---" to the Recycle Bin and then move it back if there was a major problem... obviously I was wrong!

        I must put that exact file back into the root directory...using DOS.


        the three files were likely MSDOS.SYS, MSDOS.--- and MSDOS.SYD. As far as I am aware, only MSDOS.SYS is required to boot the computer into windows... if you have any of the three files remaining, you can copy them back into a new MSDOS.SYS (or MSDOS.---, or whatever file you deleted by accident).

        I don't know your skill level in DOS, but the copy command will suffice quite well:

        Code: [Select]
        COPY C:\MSDOS.SYS C:\MSDOS.--- 

        of course, replace the first filename with one of the MSDOS.* files you haven't deleted, and the second name with the one you have deleted.


        If you've deleted all three- you can easily create a new one. in Windows 95 and up, MSDOS.SYS (and the backup copies MSDOS.--- and MSDOS.SYD) are simply text files used by the boot loader.

        I'll just transcribe the contents of the MSDOS.SYS file on my old laptop (circa 1996) assuming of course- it still boots. hasn't been used in the better part of a year. I've been meaning to clean it up anyway, so it's not out of the way at all ;)


        alright- I've got the contents of the MSDOS.SYS file, you should be able to save this into a new MSDOS.SYS file (using the EDIT program on the target computer). If you're booting windows from a drive or folder other then C:\WINDOWS, you'll need to change the respective options.
        Code: [Select]
        [Paths]
        WinDir=C:\WINDOWS
        WinBootDir=C:\WINDOWS
        HostWinBootDrv=C

        [Options]
        BootMulti=0
        BootGUI=1
        ;
        ;The following lines are required for compatibility with other programs.
        ;Do not remove them (MSDOS.SYS needs to be >1024 bytes).
        ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxa
        ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxb
        ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxc
        ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxd
        ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxe
        ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxf
        ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxg
        ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxh
        ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxi
        ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxj
        ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxk
        ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxl
        ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxm
        ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxn
        ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxo
        ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxp
        ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxq
        ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxr
        ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxs
        DoubleBuffer=1
        AutoScan=1
        WinVer=4.10.2222



        that should get you booting into the GUI again. Now that I think about it, you could have simply copied MSDOS.SYS from one of the other computers you've looked at to your ailing one.


        With all this in mind- can you start windows from the prompt it presents you by typing WIN ?
        I was trying to dereference Null Pointers before it was cool.

        AndyCountry

          Topic Starter


          Rookie

          Thanked: 1
          Re: DOS and the Recycle Bin
          « Reply #4 on: July 29, 2008, 02:27:30 PM »
          Thanks  Graham,

          I put the msdos file that you wrote out for me (thanks) onto a floppy (naming it "msdos.---") and then copied it into the ailing machine's c: drive.

          Then rebooted, but it still goes to the C:> prompt.

          Still woking with the floppy, I then change the name of that "msdos.--- " file to just "msdos.sys" and tried copy it over to the c: drive and was asked if I wanted to overwrite "msdos.sys"?  I said yes, then was given :

            "access denied  - c:msdos.sys"
                 0 file(s) copied

          Question: Shouldn't it have asked me if I wanted to overwrite "msdos.---" ?? I get the feeling that the .--- file extension is a wildcard of some sort?

          Using "Dir" command  shows that  the "msdos.---" file is there. Not msdos.sys or ANY other msdos files.... yet I know for a fact that there was an "msdos.sys" and a 3rd "msdos. " file in the root before this "event" occurred.

          Hidden files in play here?


          I next took a known good version of this msdos.sys file from another machine, as you suggested and copying it to the ailing machine's root... but my machine won't add another msdos file, it only wants to overwrite the existing, with the above referenced results.

          What is the syntax for deleting that msdos.---   file from the root directory?


          Thanks again

          patio

          • Moderator


          • Genius
          • Maud' Dib
          • Thanked: 1769
            • Yes
          • Experience: Beginner
          • OS: Windows 7
          Re: DOS and the Recycle Bin
          « Reply #5 on: July 29, 2008, 02:58:52 PM »
          Is there a full ver. (probably 6.2) installed on this machine ? ?
          If so put floppy #1 of MSDOS in and at the A; prompt type in sys C:\ and hit Enter...
          " Anyone who goes to a psychiatrist should have his head examined. "

          BC_Programmer


            Mastermind
          • Typing is no substitute for thinking.
          • Thanked: 1140
            • Yes
            • Yes
            • BC-Programming.com
          • Certifications: List
          • Computer: Specs
          • Experience: Beginner
          • OS: Windows 11
          Re: DOS and the Recycle Bin
          « Reply #6 on: July 29, 2008, 03:13:20 PM »
          Thanks  Graham,

          That was my post... you can blame him if it doesn't work, though. :D

          Thanks  Graham,



          Question: Shouldn't it have asked me if I wanted to overwrite "msdos.---" ?? I get the feeling that the .--- file extension is a wildcard of some sort?

          Using "Dir" command  shows that  the "msdos.---" file is there. Not msdos.sys or ANY other msdos files.... yet I know for a fact that there was an "msdos.sys" and a 3rd "msdos. " file in the root before this "event" occurred.

          It wouldn't of asked you to overwrite MSDOS.---, since the file obviously didn't exist. No it is not a wildcard char, only ? and * are wildcard characters.

          MSDOS.--- is likely a system-created backup of MSDOS.SYS, MSDOS.SYD (my guess as to the third filename extension) is created god knows when, and isn't used to begin with... MSDOS.SYS is hidden, and will only show up with a dir switch:
          Code: [Select]
          dir C:\ /ah


          anyway- MSDOS.SYS is always hidden on drive C:, which makes me wonder how you deleted it in the first place. I don't see how that caused a problem. instead, you might have an easier time editing your existing MSDOS.SYS file, to check for the existence of the BOOTGUI option. booting from the C:\ drive into the command line and running EDIT MSDOS.SYS should enable you to view the current settings. If BOOTGUI=0, change it to 1, and your problem should be solved. Otherwise, we'll try replacing it with a known-good version (the one I provided, assuming your Windows dir is C:\WINDOWS).


          first, you'll need to make the MSDOS.SYS file on C:\ non hidden. It's also set to System, so we'll need to do it in one fell swoop, otherwise the attrib command will whine:

          Code: [Select]
          attrib C:\msdos.sys -s -h
          (I'm a bit rusty, but if it says "not resetting ...." just flip around the -s and -h in that command.)

          now that MSDOS.SYS is visible, you can rename it (say, MSDOS.OLD) and copy over the MSDOS.SYS file from the floppy. With any luck, that will work.

          Somehow your MSDOS.SYS file that is currently on your  HD possesses the "BOOTGUI" option set to 0, or at least that is my guess.

          EDIT: patio's suggestion might help, if we forget that the machine is actually running windows 98SE which uses MSDOS.SYS for configuration data, as opposed to MS-DOS 6/6.2's MSDOS.SYS file that contains machine code.
          I was trying to dereference Null Pointers before it was cool.

          AndyCountry

            Topic Starter


            Rookie

            Thanked: 1
            Re: DOS and the Recycle Bin
            « Reply #7 on: July 29, 2008, 05:09:13 PM »
            BC........many apologies for not noting you were the person responding to me.

            What is the emoticon for "very embarrassed"??


            I thank you for your time and patience. I used your "attrib ......" command to allow me to see the hidden sys files when in DOS. However, I have forgotten most, if not all, DOS commands over the last 25 years (IBM AT) since I had to regularly use them, and when I went to rename the msdos.sys files, I was left scratching my head. I did eventually manage to rename both msdos files.

            I copied "your" msdos.sys code over to the root of the ailing machine and all is well now. An interesting aside.....your msdos file is over 1,600 bytes yet the one native to my machine contains only 9 bytes (";WIN98EBD")... both work, which is all that counts I guess. Strange.

            Thanks again  BC_Programmer. 

            You had wondered how I deleted this file in the first place? I always enable the OS to show hidden and sys files. Perhaps I should abandon that practice  :D





            BC_Programmer


              Mastermind
            • Typing is no substitute for thinking.
            • Thanked: 1140
              • Yes
              • Yes
              • BC-Programming.com
            • Certifications: List
            • Computer: Specs
            • Experience: Beginner
            • OS: Windows 11
            Re: DOS and the Recycle Bin
            « Reply #8 on: July 29, 2008, 10:55:46 PM »
            the one you copied over was the MSDOS.SYS from your Emergency Boot Disk, thus the ";Win98EBD". Normally there is that buffer of x's so older programs won't get confused when they see a  MSDOS.SYS that is smaller then 1024k, or something, not sure about the details...


            I wouldn't abandon the practice of displaying hidden/systen files, just know that when you find them, they are usually hidden for a reason :)




            I was trying to dereference Null Pointers before it was cool.