If I want to dump the old firewall rules out before adding a new set I use
/ip firewall filter
remove [ find ]
The trouble is that if there is a fasttrack rule, [ find ] returns the dynamic packet counter entry, and remove fails and the script stops executing the current code block. I’m not sure to specify non-dynamic entries to the find command
My current workaround is like this, but I’d like to know if there’s a way to identify dynamic entries with find as I potentially have this problem in other places as well, such as removing static entries from the routing table
/ip firewall filter
remove [ find action!=passthrough ]