27) MULTIPLE DOS COMMANDS ON ONE LINE set &=%4&|set n$=%4|set m$=%3|set #=%2|set !=%0 /|\ /|\ /|\ /|\ |_________|_________|________|_________________________Separators The separators (|) used in the line, are these doing anything other than separating commands? Can this be used for entering multiple commands on any line in a batch file regardless of type of command? Peter Joynson I believe you are right about this, but I think it pipes any output from the previous command to the next one (your example doesn't have any output. For example: ECHO Y|ERASE *.* This would pipe the Y to the command ERASE *.* so you wouldn't have to enter the Y for the "Are you sure" prompt. Robert Hupf The | is a pipe symbol, well documented in your DOS manual. (Read it before you read the rest of this message if you don't know about pipes already, otherwise the rest won't make sense.) Pipes can be used to put multiple commands on a single line, provided that the first command does not write anything to StdOout which might cause a problem when read by the second command as StdIn. Also, it is assumed that you don't want to see the output of any but the last command, since each command's output will be piped to the next's input. Note that in this case SET neither writes anything to StdOut nor reads StdIn. Thirdly, you must have write access to the current drive, or %temp% if defined, since a pipe always creates a temporary file. Eg this would not work if run from a write protected floppy (unless %temp% was defined), since DOS would fail to create the temporary files. Pipes create temporary files even if no actual data is sent to StdOut because Command effectively treats this: prog1 | prog2 as something like this: prog1 > %temp%tempfile prog2 < %temp%tempfile del %temp%tempfile Even if prog1 doesn't create any output, at least one zero length file is created. To demonstrate, try this set temp= set | dir I must say this beats the usual boring old "how do I echo a blank line in a batch file" etc. Mitch Ames =============================================================================== 28) COM or EXE Also, have you noticed that 4DOS.COM (when viewed with LIST) begins with the letters "MZ"? Isn't that the mark of a .EXE file? Very interesting... Thomas Smith It sure is, and that's an example of something else that may be a MUF. DOS doesn't care whether the extension on an executable file is .COM or .EXE. It looks at the beginning of the file and does the right thing according to what it finds. Gary Smith ===============================================================================