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

Author Topic: exit from a dir command  (Read 6788 times)

0 Members and 1 Guest are viewing this topic.

tyler77

  • Guest
exit from a dir command
« on: August 21, 2009, 03:33:19 AM »
Hi everybody!

how to exit after a shell command like:


dir c:\ /s 

What?

esc? or something else?

I can use only shell command. I can't close the cmd window ;)

squall_01



    Prodigy

    Thanked: 80
    Re: exit from a dir command
    « Reply #1 on: August 21, 2009, 05:07:35 AM »
    I suppose this is part of a batch file, just type exit at the end will close it.
    Windows 7 RC Tester.  Working on it.  Your monitor says etchasketch on the side!

    If I fall who is there to pick me up now.  I stand alone but I stand as the gaurdian for whom I wish to protect.  The sound of my blade utters my name as you fall.  For I shall not move.  For those that forsake the very people are wosres

    Carbon Dudeoxide

    • Global Moderator

    • Mastermind
    • Thanked: 169
      • Yes
      • Yes
      • Yes
    • Certifications: List
    • Experience: Guru
    • OS: Mac OS
    Re: exit from a dir command
    « Reply #2 on: August 21, 2009, 05:08:48 AM »
    Once it finishes completing the directory for C:\, it will close.

    WillyW



      Specialist
    • Thanked: 29
    • Experience: Experienced
    • OS: Windows XP
    Re: exit from a dir command
    « Reply #3 on: August 21, 2009, 08:40:14 AM »
    Hi everybody!

    how to exit after a shell command like:


    dir c:\ /s 

    What?

    esc? or something else?

    I can use only shell command. I can't close the cmd window ;)



    To stop it, while it is still running?

    Try    Ctrl-C


    .



    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: exit from a dir command
    « Reply #4 on: August 21, 2009, 11:52:52 AM »
    or more directly, Ctrl+Break. That's what I always use.

    I always thought it was the same as Ctrl-C, then I found that sometimes Ctrl-C didn't work, and Ctrl-Break did... although that was mostly with programs, not DOS commands.
    I was trying to dereference Null Pointers before it was cool.

    smeezekitty

    • Guest
    Re: exit from a dir command
    « Reply #5 on: August 21, 2009, 11:57:46 AM »
    CTL+C is the same as CTL+BRK
    you simply have to type break on
    before using CTL+C

    smeezekitty

    • Guest
    Re: exit from a dir command
    « Reply #6 on: August 21, 2009, 11:58:21 AM »
    forgot to add
    break is always on in windows nt command prompts


    [Moderated Message: Instead of posting twice in a row, please use the EDIT button next time. Thanks]
    « Last Edit: August 21, 2009, 12:01:00 PM by Carbon Dudeoxide »

    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: exit from a dir command
    « Reply #7 on: August 21, 2009, 12:59:30 PM »
    Control-C only activates when the program writes to or reads from the screen. even with Break ON it only extends to disk reads/writes. Control+Break interrupts it regardless.
    I was trying to dereference Null Pointers before it was cool.

    smeezekitty

    • Guest
    Re: exit from a dir command
    « Reply #8 on: August 21, 2009, 01:01:28 PM »
    Control-C only activates when the program writes to or reads from the screen. even with Break ON it only extends to disk reads/writes. Control+Break interrupts it regardless.
    not sure about that
    because if i write a C program that does a while(1){}
    loop neather CTL+BRK nor CTL+C stops it

    squall_01



      Prodigy

      Thanked: 80
      Re: exit from a dir command
      « Reply #9 on: August 21, 2009, 02:29:34 PM »


      To stop it, while it is still running?

      Try    Ctrl-C




      Isnt that a linux code or something
      Windows 7 RC Tester.  Working on it.  Your monitor says etchasketch on the side!

      If I fall who is there to pick me up now.  I stand alone but I stand as the gaurdian for whom I wish to protect.  The sound of my blade utters my name as you fall.  For I shall not move.  For those that forsake the very people are wosres

      smeezekitty

      • Guest
      Re: exit from a dir command
      « Reply #10 on: August 21, 2009, 04:39:33 PM »
      Isnt that a linux code or something
      huh?
      linux is baised on unix
      dos is baised on unix

      Quantos



        Guru
      • Veni, Vidi, Vici
      • Thanked: 170
        • Yes
        • Yes
      • Computer: Specs
      • Experience: Guru
      • OS: Linux variant
      Re: exit from a dir command
      « Reply #11 on: August 21, 2009, 04:45:11 PM »
      huh?
      linux is baised on unix
      dos is baised on unix


      DOS is not based on UNIX.

      Read This.
      Evil is an exact science.

      smeezekitty

      • Guest
      Re: exit from a dir command
      « Reply #12 on: August 21, 2009, 04:48:05 PM »
      but it got alot of idea from unix
      such as pipes

      Quantos



        Guru
      • Veni, Vidi, Vici
      • Thanked: 170
        • Yes
        • Yes
      • Computer: Specs
      • Experience: Guru
      • OS: Linux variant
      Re: exit from a dir command
      « Reply #13 on: August 21, 2009, 05:00:41 PM »
      but it got alot of idea from unix
      such as pipes


      I think you need to put the pipe down.
      Evil is an exact science.

      squall_01



        Prodigy

        Thanked: 80
        Re: exit from a dir command
        « Reply #14 on: August 22, 2009, 06:05:03 AM »
        dos was made before linux, gates asked for an os to be made an came up with this.   I ment isnt that something you could use in the bash shell.
        Windows 7 RC Tester.  Working on it.  Your monitor says etchasketch on the side!

        If I fall who is there to pick me up now.  I stand alone but I stand as the gaurdian for whom I wish to protect.  The sound of my blade utters my name as you fall.  For I shall not move.  For those that forsake the very people are wosres