hi Dan,
How can I make a copy of C:\Source\test.txt to C:\CopyLoc\
but if test.txt already exist in C:\CopyLoc\ not to do anything.
Use this Win32 API function:
Public Declare Function CopyFile Lib "kernel32" Alias "CopyFileA" ( _
ByVal AExistingFileName As String, _
ByVal ANewFileName As String, _
ByVal AFailIfExists As Boolean _
) As Boolean
Copy it in a standard module and simply use it as:
CopyFile "C:\Source\test.txt", "C:\CopyLoc\test.txt", True
mfG
--> stefan <--