请帮助我:如何将一个双命令放在cmd,像这样在Linux:apt-get install firefox && cp test.py /home/python/
,但如何在Windows?中做到这一点,更具体的Windows CE,但它在Windows和Windows CE中是一样的,因为cmd是相同的。谢谢!双命令在命令提示符下运行程序
1
A
回答
5
如果CE是一样的XP专业版(我不知道你是对的),你可以用同样的方法:
dir && echo hello
这是运行在我的Windows虚拟机(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>
一些有用的多命令选项是:
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.
2
欢呼
+0
感谢您的帮助! – 2009-07-05 12:10:22
相关问题
- 1. 运行命令提示符命令
- 2. C#在命令提示符下运行命令并显示命令
- 3. 在Windows命令提示符下运行Linux命令
- 4. 如何在命令提示符下运行Java程序
- 5. 无法在命令提示符下运行node.js程序
- 6. 运行命令来自C#程序的提示命令
- 7. 在命令提示符下使用c#为wpf应用程序执行命令
- 8. 在Windows命令提示符下粘贴但不执行命令
- 9. Windows:如何在命令提示符下指定多行命令?
- 10. 如何从VB.NET运行命令提示符命令?
- 11. Java - 打开命令提示符,运行两个命令
- 12. 通过flex运行命令提示符命令
- 13. 如何在C#上运行命令提示符程序?
- 14. 问题上运行命令提示符
- 15. 从命令提示符运行JSLint
- 16. 从Windows命令提示符运行R
- 17. 在命令提示符下运行多行vb.net
- 18. 在一个Windows命令提示符下按顺序运行多个程序?
- 19. 转义双引号命令提示符
- 20. 运行命令行程序
- 21. 模拟命令提示符命令
- 22. 某些命令在命令提示符下不起作用
- 23. 如何在windows 7命令提示符下编写adb命令
- 24. 键入命令在Windows命令提示符下不起作用
- 25. 无法在Windows命令提示符下使用命令
- 26. 命令提示符Rails应用程序
- 27. 在windows应用程序中执行的命令提示符命令
- 28. 如何通过命令提示符运行c#应用程序?
- 29. 如何使用命令提示符运行c程序
- 30. 从命令提示符(PATH环境变量)运行程序
谢谢!,非常好详细! – 2009-07-05 12:09:46