Login Register






[VB.Net] Copy API - Copy files faster filter_list
Author
Message
[VB.Net] Copy API - Copy files faster #1
Code:
Code:
Public Declare Function CopyFile Lib "kernel32" Alias "CopyFileA" (ByVal lpExistingFileName As String, ByVal lpNewFileName As String) As Long



Usage:
Code:
CopyFile("C:\file.exe", "C:\file2.exe")



Got any problems ask me Smile
Spoiler: Credits
Credits go to Microsoft
Pierce the life fibers with your drill.

Reply

RE: [VB.Net] Copy API - Copy files faster #2
I think I love you =D was just thinking how to do this =) wanted to use batch code =D

Big thanks!!!
Staff will never ever ask you for your personal information.
We know everything about you anyway.

Reply

RE: [VB.Net] Copy API - Copy files faster #3
Well, your welcome i thought i share this cause i use this in my worm Smile
Pierce the life fibers with your drill.

Reply

RE: [VB.Net] Copy API - Copy files faster #4
(02-17-2011, 07:30 PM)1234hotmaster Wrote: Well, your welcome i thought i share this cause i use this in my worm Smile

Yeh =) well I might use it in my bot =D
Staff will never ever ask you for your personal information.
We know everything about you anyway.

Reply

RE: [VB.Net] Copy API - Copy files faster #5
Well, file-transfer speed depends on your HDD spin-rate or SSD's max transfer-speed. What this API is offering here is the copy code in the raw form, which would be good but not really noticeable.

Full API with description

If you leave the bFailIfExists Boolean, it is the same as:
Code:
FileCopy(source, destination) 'Or IO.File.Copy(source, destination)

If you are looking to squeeze out performance, then reduce string concatenations (& or +) in your code, especially in Loops. That will make your Loops faster. Smile
[Image: rytwG00.png]
Redcat Revolution!

Reply