up vote 3 down vote favorite
1
share [g+] share [fb]

How can I execute multiple commands in the Windows commandline with just a single line?

So for example say I want to perform an SVN update and then copy all of the files to another location...

svn update; copy *.* c:\development\copy\

That doesn't work obviously. Is there a character or delimiter like ';' to perform something like this?

link|improve this question
feedback

2 Answers

up vote 9 down vote accepted

Yes there is. It's &.

&& will execute command 2 when command 1 is complete providing it didn't fail, & will execute regardless.

link|improve this answer
1  
& and && only work in Windows' cmd.exe - which is not DOS. – grawity Oct 30 '09 at 15:21
'DOS' as a term is often used to describe cmd, and seeing as the op uses svn I highly doubt he's still using DOS. No need to be pedantic :) – Phoshi Oct 30 '09 at 15:37
There: urlencode.blogspot.com/2009/06/vista-desktop-june-09.html He uses Windows XP. Certainly not DOS (it never looked that good ;)) – Phoshi Oct 30 '09 at 15:45
I think it's safe to assume that when anyone mentions "DOS", they really mean "Windows Command Prompt". I'm going to go out on a limb here and say that most people probably don't use DOS much these days. Thanks for the correction - it's just a bit unnecessary in this day and age. – Murdoch Ripper Nov 5 '09 at 4:35
feedback

At least in MS-DOS 6.22 I used to use the key Ctrl+T to get a kind of paragraph symbol. This worked just like the & mentioned by Phoshi.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.