helo.
ferst i wont to sory for my english.

pleas help me i wont copy files in Console mode.
i do thes but dont worcks

.data
Buffer       db 15 dup(?)
.code     
        output_file  dd ?
        input_file         db "my.jpg",0
start:
       
        invoke GetCL, 1, ADDR Buffer
        invoke lstrcmpi, ADDR Buffer, ADDR output_file
        .if eax == 0               
        push offset input_file
        push offset output_file
        call CopyFile             
         
        .else
        jmp exit
        .ENDIF
       
        exit:
        invoke ExitProcess, 0
        ret
end start 
Posted on 2005-11-05 14:24:27 by zames
The CopyFile function copies an existing file to a new file.

BOOL CopyFile(

    LPCTSTR lpExistingFileName, // pointer to name of an existing file
    LPCTSTR lpNewFileName, // pointer to filename to copy to
    BOOL bFailIfExists // flag for operation if file exists
  );


Parameters

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.



Return Values

If the function succeeds, the return value is nonzero.
Posted on 2005-11-05 20:20:32 by miaomiao