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

Author Topic: interact with the dos command output using a batch file  (Read 2603 times)

0 Members and 1 Guest are viewing this topic.

farzi

  • Guest
interact with the dos command output using a batch file
« on: September 11, 2007, 04:12:18 AM »
Hi

I will explain my problem with the command itself.
Whenever i give a command comp filename1 filename2

The out put is :

Comparing filename1 and filename2...
Files are different sizes.

Compare more files (Y/N) ?



I want to give a Y/N using batch file itself.How can this be done?
I am using:Microsoft Windows XP [Version 5.1.2600]

gpl



    Apprentice
  • Thanked: 27
    Re: interact with the dos command output using a batch file
    « Reply #1 on: September 11, 2007, 04:33:28 AM »
    Try this
    Echo N|comp filename1 filename2

    The | symbol sends the output of the first command (Echo N) as input to the second (the Comp command)


    Graham

    farzi

    • Guest
    Re: interact with the dos command output using a batch file
    « Reply #2 on: September 11, 2007, 04:38:04 AM »
    Thanx a ton graham..
    i dont know if this is the right solution ..but it is working great for me ..
    thanks again ..