views:

271

answers:

2

Hello,

Please, help me in: how to put a double command in the cmd, like this in the Linux: apt-get install firefox && cp test.py /home/python/, but how to do this in Windows?, more specific in Windows CE, but it´s the same in Windows and in Windows CE, because the cmd is the same. Thanks!

+2  A: 

Hi

This http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shelloverview.mspx?mfr=true might be of some help.

cheers

Andriyev
Thanks For The Help!
Nathan Campos
+5  A: 

If CE is the same as XP Pro (and I'm not sure you're right about that), you can use the same method:

dir && echo hello

Here it is running on my Windows VM (XP SP3):

C:\Documents and Settings\Pax>dir && echo hello
 Volume in drive C is Primary
 Volume Serial Number is 04F7-0E7B

 Directory of C:\Documents and Settings\Pax

29/06/2009  05:00 PM    <DIR>          .
29/06/2009  05:00 PM    <DIR>          ..
17/01/2009  12:38 PM    <DIR>          Desktop
: : :
29/06/2009  05:00 PM             4,487 _viminfo
          14 File(s)         51,658 bytes
           9 Dir(s)  13,424,406,528 bytes free
hello

C:\Documents and Settings\Pax>

Some of the useful multi-command options are:

cmd1 &  cmd2 - run cmd1 then run cmd2.
cmd1 && cmd2 - run cmd1 then, if cmd1 was successful, run cmd2.
cmd1 || cmd2 - run cmd1 then, if cmd1 was not successful, run cmd2.
paxdiablo
Thanks!, Very Good Detailed!
Nathan Campos