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

Author Topic: MS-DOS RmDir Command  (Read 7167 times)

0 Members and 1 Guest are viewing this topic.

mellowco

    Topic Starter


    Newbie

    MS-DOS RmDir Command
    « on: May 26, 2009, 11:37:05 PM »
    Hello:

    I have Windows XP SP3 operating system.

    After a RMDIR command executes in my MS-DOS batch program, the rest of the MS-DOS commands after the RMDIR command do not execute. I don't know why.

    Here is the directory structure that I have:

    Folder 1\Folder 2\Folder 3
        Folder 4
            Folder 5
            Folder 6
        Folder 7
            Folder 8
            Folder 9
        Folder 10
            Folder 11

    This is the RMDIR command that I coded in my MS-DOS batch program.
     
    RMDIR /Q /S "C:\Folder 1\Folder 2\Folder 3"

    When the RMDIR command executes, it deletes C:\Folder 1\Folder 2\Folder 3 and all the sub directories and files below it, which is what I want it to do, but then the rest of the commands after the RMDIR command in the batch file do not execute.

    Does anyone know the reason for this?

    Thanks for all your help!

    Edward

    Helpmeh



      Guru

    • Roar.
    • Thanked: 123
      • Yes
      • Yes
    • Computer: Specs
    • Experience: Familiar
    • OS: Windows 8
    Re: MS-DOS RmDir Command
    « Reply #1 on: May 27, 2009, 05:45:19 AM »
    Hello:

    I have Windows XP SP3 operating system.

    After a RMDIR command executes in my MS-DOS batch program, the rest of the MS-DOS commands after the RMDIR command do not execute. I don't know why.

    Here is the directory structure that I have:

    Folder 1\Folder 2\Folder 3
        Folder 4
            Folder 5
            Folder 6
        Folder 7
            Folder 8
            Folder 9
        Folder 10
            Folder 11

    This is the RMDIR command that I coded in my MS-DOS batch program.
     
    RMDIR /Q /S "C:\Folder 1\Folder 2\Folder 3"

    When the RMDIR command executes, it deletes C:\Folder 1\Folder 2\Folder 3 and all the sub directories and files below it, which is what I want it to do, but then the rest of the commands after the RMDIR command in the batch file do not execute.

    Does anyone know the reason for this?

    Thanks for all your help!

    Edward

    What is the FULL code in your batch script?
    Where's MagicSpeed?
    Quote from: 'matt'
    He's playing a game called IRL. Great graphics, *censored* gameplay.

    mellowco

      Topic Starter


      Newbie

      Re: MS-DOS RmDir Command
      « Reply #2 on: May 27, 2009, 08:43:00 AM »
      Dear Helpmeh:

      Thank you very much for your help.

      After I received your reply, "What is the FULL code in the batch script", I did some more work on the problem, and I found out what was wrong.

      The batch file that has the RMDIR command executes from one of the subdirectories that is being removed by the RMDIR command. When I execute my batch program from a different directory, the RMDIR command deletes properly the directory and the sub directories that I want, and then the rest of the MS-DOS commands after the RMDIR command execute as well.

      Thanks again for all your help.  It was very much appreciated.  :)

      With very best wishes,

      Edward

      Helpmeh



        Guru

      • Roar.
      • Thanked: 123
        • Yes
        • Yes
      • Computer: Specs
      • Experience: Familiar
      • OS: Windows 8
      Re: MS-DOS RmDir Command
      « Reply #3 on: May 27, 2009, 03:11:44 PM »
      Dear Helpmeh:

      Thank you very much for your help.

      After I received your reply, "What is the FULL code in the batch script", I did some more work on the problem, and I found out what was wrong.

      The batch file that has the RMDIR command executes from one of the subdirectories that is being removed by the RMDIR command. When I execute my batch program from a different directory, the RMDIR command deletes properly the directory and the sub directories that I want, and then the rest of the MS-DOS commands after the RMDIR command execute as well.

      Thanks again for all your help.  It was very much appreciated.  :)

      With very best wishes,

      Edward
      There, if you just leave it for a little while, come back later with fresh thoughts, you're bound to solve it! Feel free to stick around to help out other members, or get more help when needed! :)
      Where's MagicSpeed?
      Quote from: 'matt'
      He's playing a game called IRL. Great graphics, *censored* gameplay.