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

Author Topic: 2 Handy Tips  (Read 3032 times)

0 Members and 1 Guest are viewing this topic.

Dias de verano

  • Guest
2 Handy Tips
« on: May 15, 2008, 02:13:03 PM »
These are for Windows 2000/XP/Vista

Unlike PAUSE, which accepts any key, SET /P will only accept the Enter key.

Code: [Select]
SET /P =Press Enter to continue . . .
Group commands for redirection:
 
To log the result of several commands, a commonly used method is

Code: [Select]
command1 >  logfile.log
command2 >> logfile.log
command3 >> logfile.log

In Windows NT4/2000/XP command grouping can be used to simplify the code:

Code: [Select]
(
    command1
    command2
    command3
) > logfile.log

cryhelp



    Hopeful
  • Only the educated are free=Epictetus
    Re: 2 Handy Tips
    « Reply #1 on: May 15, 2008, 02:44:11 PM »
    Thanks for the tips ;D
    "Training is everything. The peach was once a bitter almond; cauliflower is nothing but cabbage with a college education"  Mark Twain

    Carbon Dudeoxide

    • Global Moderator

    • Mastermind
    • Thanked: 169
      • Yes
      • Yes
      • Yes
    • Certifications: List
    • Experience: Guru
    • OS: Mac OS
    Re: 2 Handy Tips
    « Reply #2 on: May 15, 2008, 07:09:04 PM »
    From my experience, you don't need to create the log file first.

    Dias de verano

    • Guest
    Re: 2 Handy Tips
    « Reply #3 on: May 16, 2008, 12:17:35 AM »
    From my experience, you don't need to create the log file first.

    Where did I say that you did? It depends (obviously) on what you want to do. If you want to create a new file each time, overwriting any other with the same name, then you would use the > symbol. If you want to create a file if it does not yet exist, OR add text to the end if it does already exist, you would use >>.



    vibhor_agarwalin



      Adviser

      Re: 2 Handy Tips
      « Reply #4 on: May 16, 2008, 01:00:03 AM »
      Nice tips
      Vibhor Kumar Agarwal