To download this file, please login or click here to register
Description:
Direct Implementation of CopyFile and MoveFile Kernel32 functions.
-------------------------------------------------------------------
Private Declare Function CopyFile Lib "kernel32" Alias "CopyFileA" (ByVal lpExistingFileName As String, ByVal lpNewFileName As String, ByVal bFailIfExists As Long) As Long
Private Declare Function MoveFile Lib "kernel32" Alias "MoveFileA" (ByVal lpExistingFileName As String, ByVal lpNewFileName As String) As Long
Our code has two functions Copy_File and Move_File each having two parameters, source file paremeter and destination file parameter.
If you want to use this code, just copy and paste in your code and call the functions by there names like
Copy_File("C:\abc.txt","D:\abc2.txt")