there is no way to run more than one command in the dos commandline, except command piping. A possibility is to turn over the value as a commandline argument: The first line in your a.bat should bee: set val=%1 Call the batchfile a.bat with your value (i.e. 7) in one command line: call a.bat 7 If you cannot modify your a.bat before, then you can generate a version of it: echo set val=%%1 > b.bat cat a.bat >> b.bat call b.bat 7 -- To unsubscribe from this list: send the line "unsubscribe linux-msdos" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html