|
CopyFile The CopyFile function copies an existing file to a new file. VB4-32,5,6 Declare Function CopyFile Lib "kernel32" Alias "CopyFileA" (ByVal lpExistingFileName As String, ByVal lpNewFileName As String, ByVal bFailIfExists As Long) As Long |
VB.NET System.IO.File.Copy |
Operating Systems Supported |
Requires Windows NT 3.1 or later; Requires Windows 95 or later |
· lpExistingFileName Points to a null-terminated string that specifies the name of an existing file.
· lpNewFileName Points to a null-terminated string that specifies the name of the new file.
· bFailIfExists Specifies how this operation is to proceed if a file of the same name as that specified by lpNewFileName already exists. If this parameter is TRUE and the new file already exists, the function fails. If this parameter is FALSE and the new file already exists, the function overwrites the existing file and succeeds. |
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError. |
|
|
|