![]() |
Copy Files action
Is it possible to make the copy files action fail if one of the files
listed to be copied isn't found? or do i have to use the vbscript filecopy function and check its return value? |
No. One option would be, before copying, to add a step that conditionally builds (and fails) if the file doesn't exist. For instance, a Run Program step with a command of 'File xyz does not exist', and a conditional build rule of '[vbld_FSO.FileExists("xyz")]' equal to 0. Or you could use a Run Program step of %DOSCMD% copy xyz
|
Does Kinook intend to fix this 'feature' any time soon?
|
I think an option like "Fail build when one or more files are not found." to this step would really help.
I guess this is not quite possible because this step supports wildcard. So it is not able to do a proper counting. |
If you're doing a non-incremental, non-recursive copy, aren't excluding any files, and the files listed to be copied are all filenames and not wildcards or folders, you could use script code like this in the step's vbld_StepDone script event to fail if the copy count doesn't match the filename count:
Code:
Sub vbld_StepDone() http://www.kinook.com/VisBuildPro/Ma...ilesaction.htm |
All times are GMT -5. The time now is 02:33 PM. |
Copyright © 1999-2023 Kinook Software, Inc.