If you must verify the copy status, don't
use mode 4. If, however, you would still like the copy to be
asynchronous to your Cicode, create a new Cicode task to call
FileCopy in synchronous mode. For example:
INT
FUNCTION
MyFileCopy(STRING sSource, STRING sDest)
INT status;
status = FileCopy(sSource, sDest, 0);
IF status <> 0 THEN
Prompt("Copy failed");
END
END
......
! create a new task to copy the file to give effect of async
mode
TaskNew("MyFileCopy",
"^"c:\citect\bin\readme.txt^",^"a:\readme.txt^"", 0);
Note that 99% of the time you should not have to do this, just
use mode 0. If you use mode 0, it is synchronous to the Cicode task
that called FileCopy, but it is asynchronous to all running Cicode
tasks - it will not effect any other Cicode task or other Citect
process. |