WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

File Operations

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

FileCopy Error Handling


Question:

When using the filecopy function and the warning parameter is set to true, the return value will be false if at least 1 of the files in the source list is not copied, correct?

What does this mean:

Note: If warning parameter is set to @TRUE , then the return value will be @TRUE, even if it was modified by the user dialog.

Answer:

My understanding is...

If you do FileCopy(...,...,@FALSE)

and one or more of the files do not get copied for some reason, AND you are handling errors yourself, then you will get a @FALSE return code.

If you do FileCopy(...,...,@TRUE)

and the file overwrite dialog comes up and you select a subset (so not all files are copied) then you can get a @TRUE return even if not all the files are copied (well, since you requested that not all files be copied)

But if you are handling errors and one or more of the subset of files you selected in the dialog failed top copy, then you would get an @false return.


Article ID:   W15945
File Created: 2004:03:30:15:41:54
Last Updated: 2004:03:30:15:41:54