I'm going to be passed a dos based command to my vb6 program. I would like to take the multiline output of that command and create a command line command for each line it generates. The only way I know to do this at the moment is to pipe it to a text file and then read that file in a line at a time creating the command and issuing it or creating a batch file and executing it. Either way, the extra I/O will probably cause overhead I don't want. Any ideas?

I'm going to be passed a dos based command to my vb6 program. I would like to take the multiline output of that command and create a command line command for each line it generates. The only way I know to do this at the moment is to pipe it to a text file and then read that file in a line at a time creating the command and issuing it or creating a batch file and executing it. Either way, the extra I/O will probably cause overhead I don't want. Any ideas?

Why to create a text file? Your pipe itself saves this purpose. FIFO.

Why to create a text file? Your pipe itself saves this purpose. FIFO.

I need to alter the output so that it becomes the executable I need. Can I pipe to an array?

I need to alter the output so that it becomes the executable I need. Can I pipe to an array?

That depends upon the size of your output. If it is samll you can size and resize an array. But if it is too large your program address space will demand more memory which may cause other programs not to co-exist.

This article has been dead for over six months. Start a new discussion instead.