Once i wanted functionality similler to your problem and i have done something like this.
This is not exact solution to your problem but it may give you an idea.
private void btnBrowse_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.Title = "choose your file";
if (ofd.ShowDialog() == DialogResult.OK)
{
filepath = ofd.FileName.ToString();
}
long size = (new FileInfo(filepath).Length);
FileStream fs = new FileStream(filepath, FileMode.Open, FileAccess.ReadWrite);
byte[] data = new byte[size];
try
{
fs.Read(data, 0, (int)size);
}
catch (Exception ex)
{
MessageBox.Show("error in file read..." + ex.ToString());
}
finally
{
fs.Close();
fs.Dispose();
}
MemoryStream ms = new MemoryStream();
ms.Write(data, 0, (int)size);
destPath = Application.StartupPath.ToString() + "\\images";
destPath = Path.Combine(destPath, Path.GetFileName(filepath));
File.Copy(filepath, destPath);
}
Hope This help