cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
eladef
Level 7

Problem with XCopyFile – get success even if source doesn’t exists

Hi

It seems the function doesn't check if the source exists and return success even if it does not – is that known issue ?
(I have tried the ISH XCopyFile Example and got no errors )

Are there any alternative to that function beside using windows xcopy.exe ?
Labels (1)
0 Kudos
(1) Reply
RobertDickau
Flexera Alumni

Could you post the code? A quick InstallScript test with a missing source file---
function OnBegin( )
NUMBER ret;
begin

ret = XCopyFile(WINDIR ^ "no-such.file", TARGETDIR, COMP_NORMAL);

SprintfBox(INFORMATION, "XCopyFile result",
"ret = %d\nMsg = %s", ret, FormatMessage(ret));

end;
---displays a message box with:
nvIgnore = -2147024894
Msg = The system cannot find the file specified.
0 Kudos