Hi @Alexandre Munday ,
Welcome to Microsoft Q&A Platform. Thanks for posting the query.
Possible approach I can think of is by using the additional file for invalid data and later the size can be evaluated to check if there any invalid records are not and assign the folder name accordingly. The invalid data can be retrieved by using filter activity in dataflow. Below GIF and attached JSON shows the details of the approach used. Please check and let us know if this helps.
Kindly let us know if it does not align with the requirement or for further queries and we will be glad to assist.