Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying Multiple files into One file...

Status
Not open for further replies.

VisualGuy

Programmer
Joined
May 27, 2003
Messages
162
Location
US
It is hard for me to imagine that there isn't a copy command in VB.NET that will allow me to copy multiple files into one file...as was the case with DOS.

In DOS it's FILE1.TXT + FILE2.TXT + FILE3.TXT FILEALL.TXT

FILEALL.TXT would contain Files 1,2 & 3. I'm sure I could just create and execute a batch file to do this, but then VB.NET won't wait until I'm finished executing the command before going to the next line of code.

Does anyone have any suggestions?
 
...VB.NET won't wait until I'm finished executing the command before going to the next line of code

You can make Vb wait for the batch file to finish.

Dim p As New Process

p.StartInfo.FileName = "FileJoin.bat"
p.Start()
p.WaitForExit() 'this will wait indefinitely for the process to exit

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day! Ye has a choice: talk like a pira
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top