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

vb.net copy large binary object QUICKLY

Status
Not open for further replies.

Schimsky

Programmer
Oct 4, 2003
23
0
0
US
Hi,

Can anyone point me in the direction to see code on exactly how to copy a large binary object using vb.net quickly?

Thanks.

Steve
 
From where to where?

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
Hi,

Just from c:\ drive to c:\ drive

Steve
 
Try this:
Code:
Imports System.IO

Dim SrcPath, DestPath As String

Try
   SrcPath = "C:\SomeBigFile.bin"
   DestPath = "C:\Subdirectory\SomeBigFile.bin"

   File.Move(SrcPath, DestPath)

Catch ex As Exception
   ' Log Error

End Try
This will use Win32 operating system calls under the hood to move the file, so it's as fast as you'll get.

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
if you use File.Move it will actually move the file instead of copying it. File.Copy(srcpath,destpath) copies.

CHIX001
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top