PDA

View Full Version : Process Files step -- fail if no matching files found?


deramor
03-19-2015, 03:29 PM
Hello-

Is there a way to fail a process files step if there are no files found matching a given filter? I see that in the copy files step there is an option to fail the step if there are no files to copy. I am looking for a similar option for the process files step.

Example:

Given the following folder:
c:\temp\v1.0\bin

Process all files in the folder only including files matching *V1.0.dll
If there are no Dlls matching the filter, I would like the step to fail.

Currently, the step gets skipped along with all of its children steps.

kinook
03-19-2015, 04:23 PM
You can't fail the Process Files step itself in that situation, but in the following sibling step, you could check the temporary macro PROCFILES_COUNT and fail the build if it is 0. See the attached project.

kinook
07-09-2015, 09:22 AM
Implemented in v9.
http://www.kinook.com/VisBuildPro/Manual/processfilesaction.htm