command :for returning error

Dear Sirs,
I have a question that may seem simple, that is:
I need a script that makes a command on the lines of โ€œ/ ip firewall filter enable numbers = $iโ€

I am running the script:
enable:
:for i from=1 to=5 do= {[/ip firewall filter enable numbers=$i]}
disable:
:for i from=1 to=5 do= {[/ip firewall filter disable numbers=$i]}
and got a reply:
interrupted no such item :confused:

please help me: thank you all!

You canโ€™t use console numbers in scripts. Scripts works properly only with internal IDs, which are returned by find command.

Could you give me an example of how to call this script with internal id (calling to find).

for example, would enable or disable multiple lines with one command only firewall time

It depends on what exactly you want to disable, for example disable all firewall rules with protocol=tcp

/ip firewall filter disable [find protocol=โ€œtcpโ€];

Thanks
I got this way, your help was very useful โ€ฆ

:local var 10;
Enable: for i from=1 to=$var do={[/ip firewall filter enable [find comment=โ€œlineโ€ . $i]]}
Disable: for i from=1 to=$var do={[/ip firewall filter dissable [find comment=โ€œlineโ€ . $i]]}

thanks :smiley: :smiley: :smiley: