The easiest way to do this is to use the '&' or '&&' operator between each step. The '&' operator executes each command regardless of previous command success while the '&&' operator causes the whole line to fail at the first
command failure.
For example, the following line will try to make c:\test and store the current directory listing inside it:
mkdir c:\test & dir > c:\test\diroutput.txt
Using '&&' would cause this command to fail if c:\test already exists because the mkdir command would fail, while using '&' succeeds. Which one you need will depend on your command logic.
An alternatively solution for more complex tasks is to create a .cmd or .bat file containing the commands and have the task invoke the script.
Jeremy