# Detect zero byte file

**URL:** <https://forum.cloverdx.com/t/detect-zero-byte-file/2124>\
**Category:** CloverDX Platform\
**Created:** [February 9, 2022, 3:09pm UTC](https://forum.cloverdx.com/t/detect-zero-byte-file/2124 "2022-02-09T15:09:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike\_Podgorski](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@Mike\_Podgorski](https://forum.cloverdx.com/u/Mike_Podgorski)\
**Post date:** [February 9, 2022, 3:09pm UTC](https://forum.cloverdx.com/t/detect-zero-byte-file/2124/1 "2022-02-09T15:09:14Z")

</div>

I have a job that reads a pipe (|) delimited file, using a UniversalDataReader, and writes the contents to a database table. We a have an issue where the supplier of the files occasionally sends a file with no data in it. Is there a way to trigger an alert or force an error in the clover server when this happens?

---

<div class="post-metadata">

**Author:** ![David\_Pavlis1](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.cloverdx.com/david_pavlis1/32/67_2.png) [@David\_Pavlis1](https://forum.cloverdx.com/u/David_Pavlis1)\
**Post date:** [February 11, 2022, 6:56pm UTC](https://forum.cloverdx.com/t/detect-zero-byte-file/2124/2 "2022-02-11T18:56:30Z")

</div>

Hi Mike,

The best approach would be to use a JOBFLOW which would first check the size of the file and if it is greater than zero, then execute your transformation graph (via ExecuteGraph component) feeding the path of the file to it. In the zero size case it can send e-mail or just fail, and then you can have a [listener setup](https://doc.cloverdx.com/latest/server/listeners.html)on your server which is triggered whenever that particular JOBFLOW fails.

Look at [https://doc.cloverdx.com/latest/designer/listfiles.html](https://doc.cloverdx.com/latest/designer/listfiles.html) for ListFiles jobflow component reference.
