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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

split files + rejoin them

Status
Not open for further replies.

ssj3gohan

Programmer
Jun 2, 2003
34
AU
Does anyone know how to get vb to split a user specified file into little 'chunks'? Also how to write a batch file from vb to join the files together or get vb to join them together? i also need a way to sense how many 'chunks' a file has been split into.

Thanks
 
read the file, split it into chunks based on some delimiter.
if you split it into an array use the UBound function of the array.
If you can split the text stream using
aArray = Split(objTextStream, "delimiterstring", -1, 1)
then you will know how many chunks you have

join them back again but looping through the array and adding thwe delimiter each time

For EAch aChunk In aArray
strTextstream = strTextStream & "delimiterstring" & CStr(aChunk
Next

then write the strTextStream to a new file
Next
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top