I have been out of programming for a while, so please take
it easy on me.
This code works fine if the file is not in a hidden
directory. Is this a XP issue ?

Thanks.

; copyf.asm Copy a file over an existing file
;

.486
.model flat, stdcall ; 32 bit memory model
option casemap :none ; case sensitive


include \masm32\include\windows.inc
include \masm32\include\masm32.inc
include \masm32\include\gdi32.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
include \masm32\include\Comctl32.inc
include \masm32\include\comdlg32.inc
include \masm32\include\shell32.inc
include \masm32\include\oleaut32.inc
include \masm32\macros\macros.asm

includelib \masm32\lib\masm32.lib
includelib \masm32\lib\gdi32.lib
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\Comctl32.lib
includelib \masm32\lib\comdlg32.lib
includelib \masm32\lib\shell32.lib
includelib \masm32\lib\oleaut32.lib

..data

File1 db "C:\Supplies\Lab_Order.xls", 0 ; file names
are case sensitive
File2 db "C:\spare\Lab_Order.xls", 0

..code

start:

main proc

LOCAL buffer[260]:BYTE
invoke GetCL,1,ADDR buffer

; 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.

invoke CopyFile, offset File1, offset File2, FALSE
invoke ExitProcess,0

main endp

end start