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

Author Topic: MS-DOS & Command Line Batches  (Read 3720 times)

0 Members and 1 Guest are viewing this topic.

chan61

    Topic Starter


    Starter

    MS-DOS & Command Line Batches
    « on: December 19, 2009, 10:40:18 PM »
    I've just got a few questions and need some help with a batch file command.  I need help on displaying a message while running a command at the same time.
     (i.e. "ipconfig.exe" and to display "Configuring Your IP Settings").  At the moment I am writing a batch file for a few friends and it renews their ip, cleans all of their disks, defragments their disks, and a few other commands.  I want the batch to display an alternate message like the example above.  Thanks!

    oldun

    • Guest
    Re: MS-DOS & Command Line Batches
    « Reply #1 on: December 20, 2009, 02:10:28 AM »
    Simply echo the message before running the programme.

    i.e.
    Echo.Configuring Your IP Settings
    ipconfig [params]

    chan61

      Topic Starter


      Starter

      Re: MS-DOS & Command Line Batches
      « Reply #2 on: December 20, 2009, 07:02:10 PM »
      Hey thanks for the reply I just have a few mishaps.  My first is that im not sure of the syntax of this command and just to make sure we are on the same page, I want to run the command and while the command is running I want the prompt to say whatever.  (i.e command: ipconfig; I want it to say Configuring Your IP Settings) Another argument would be for the command to run in the background. For example, if any of you have run the ipconfig command, you see all of the output it spits out like your ip configuration and such.  I want this to disapear and just display what I want it to display while running the commmand in the background. Thanks Guys!

      oldun

      • Guest
      Re: MS-DOS & Command Line Batches
      « Reply #3 on: December 20, 2009, 09:15:59 PM »
      The syntax is as described earlier. Just enter Echo.followed by the message to be displayed.

      You can redirect IPCONFIG to NUL to prevent the output from being displayed.

      e.g.
      IPCONFIG /ALL >NUL

      If you need to wait for the command to complete before the next one starts, use START with the WAIT option.

      e.g.
      Start "" /MIN /WAIT IPCONFIG /ALL


      Type Start /? or Echo /? in a command window to display the syntax.

      chan61

        Topic Starter


        Starter

        Re: MS-DOS & Command Line Batches
        « Reply #4 on: December 20, 2009, 10:04:56 PM »
        How do I make the IPCONFIG command totally invisible though?  I understand the "nul" command, it makes the output invisible and also the echo command I understand. I just want to know how to make the actual "IPCONFIG" command totally invisible but still run in the background.

        ">Configuring Your IP Settings" would be the prompt and I want it to run the "IPCONFIG" command while still displaying my message.  Almost like an animation effect.  If  possible what about having it display "Configuring Your IP Settings.""Configuring Your IP Settings..""Configuring Your IP Settings..." Is that possible? Thanks again guys!

        oldun

        • Guest
        Re: MS-DOS & Command Line Batches
        « Reply #5 on: December 20, 2009, 11:03:46 PM »
        Redirecting IPCONFIG to NUL will redirect the whole command line to NUL.

        Try it. If it doesn't work as you expect, give an example of your batch file.