How force launchd not to look into subfolders with QueueDirectories parameter in launchd.plist I'm processing images put into specific folder.

For that I run script with launchd.plist put into ~/Library/LaunchAgents
Everything work smoothly. But I want put resulting files into subfolder of that folder.
Folder is not empty, it has subfolder, so my script is run over and over again every 10 seconds.
There is nothing to process. But launchd runs script ten times a minute wasting resources.
How can I hide from launchd subfolders in folders from QueueDirectories parameter?
Filenames are arbitrary so I can't use WatchPaths parameter.
I believe parameter like maxdepth should exist.

Any solution?
QueueDirectories won't work anyway, because it'd trigger on the subdirectories themselves whether or not they had any files in them. The mere existence of subdirectories in the watched directories will trigger the script.

Instead, you should use WatchPaths on the main directory itself -- whenever a new image file is added to the directory, the directory is modified, so WatchPaths will trigger your script to process the file. Moving the image file will modify the directory again, but since it happens while your script is running it won't trigger a rerun.