cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Courtney11
Level 3

xCopyFile Failing

xCopyFileFailing in 2008 professional - get negative error which means file not found.

Paths are correct and createdir works.

I have even tried full path C:\\smartware group\smart maintenance

Still does not work


snippet of code is below


function BackupFiles(hMSI)
number nReturn;
string sReturn;
begin
nReturn = CreateDir(WINDISK + "\\smartbackup");
if nReturn != 0 then
NumToStr(sReturn, nReturn);
MessageBox("Error " + sReturn, SEVERE);
endif;



nReturn = XCopyFile("PROGRAMFILES + Smartware Group\\Smart Maintenance", "C\\smartbackup", COMP_NORMAL | READONLY | INCLUDE_SUBDIR);
if nReturn != 0 then
NumToStr(sReturn, nReturn);
MessageBox("Error " + sReturn, SEVERE);
endif;
Labels (1)
0 Kudos
(1) Reply
Vijay_K
Level 4

This is how I would code it. I have used this syntax, maybe give it a go?

nReturn = XCopyFile(PROGRAMFILES ^ "Smartware Group\\Smart Maintenance\\*", "C:\\smartbackup\\*", COMP_NORMAL | READONLY | INCLUDE_SUBDIR);
0 Kudos