Hi, we meet again to discuss MS-DOS (again...). This time I want to write about how to grouping one or more commands in one line command. I think this's a simple article but on other hands if we can use it you can make MS-DOS command be more efficient. And if you in Windows XP GUI mode maybe you cann't give them command group like this easier. You may to make batch file to save them so next time you just execute the batch file. And I know maybe you think UNIX commands more powerful but you can also make 'powerful' commands with MS-DOS group commands.
OK, I hope you'll get 'something' after read this article :
That's it, and I am thinking what I will write on part-3 hehehe, I hope I can continue it.....
You can execute two commands in one processing with "&" character, to use it just type command1 & command2, when Enter pressed so computer will process command1 and then command2. For example you can make a folder first and then copy a file to its folder, for illustrating that look this, md c:\test & copy c:\document\today.doc c:\test. After c:\test folder has created then today.doc will copy to c:\test.
If you use this character second command will executed if first command are executed successfully. For example like this command cd c:\test && copy c:\document\office.doc c:\test so it's means copy command will executed if cd c:\test are executed successfully.
Reversed with number 2, if you using this character so second command will executed if first command are failed to executed. For example cd c:\test || md c:\test as it seen if cd c:\test command is fail and then md c:\test will executed.
Using Group of Command on MS-DOS inside Windows XP
Posted by EdSto | 8:39 PM | MS DOS Commands | 1 comments »
Subscribe to:
Post Comments (Atom)
Dude, thanks for providing these instructions. Perfect timing on the post. A Google search brought me here.