Problem in splitting a file
<pre><code>int bufferlength = 12488;
int pointer = 1;
int offset = 0;
int length = 0;

FileStream fstwrite = new FileStream("D:\\Movie.wmv", FileMode.Create);
while (pointer != 0)
{
    byte[] buff = new byte[bufferlength];
    FileStream fst = new FileStream("E:\\Movie.wmv", FileMode.Open);
    pointer = fst.Read(buff, 0, bufferlength);
    fst.Close();
    fstwrite.Write(buff, offset , pointer);
    offset += pointer;
}
</code></pre>

<p>I used the above code for splitting a file and place it in other drive.Im not able to set the correct offset and length for this routine can anyone help me to fix this</p>

<p>splitting in the sense ,i split it in "x" kbs and pass it somewhere  make the same file in some other location</p>

<p>I find it atlast ,thanks to evry one who gave their valueble responses.</p>
