I need a script - please help

Hi all,
I need your help to solve the following problem:
i have the following situation:
-a) in ip / firewall / address-list I have a few address
-b) in /file have a file address-list.rsc with lines of the form
/ ip firewall address-list
add address = 89.x.x.171 disabled = no list = test
add address = 89.x.x.104 disabled = no list = test
add address = 89.x.x.126 disabled = no list = test
add address = 89.x.x.156 disabled = no list = test


I need a script to empty the contents of -a) , then execute the file address-list.rsc
Thank you very much!

Liviu

{
:local i; :foreach i in=[/ip firewall address-list find] do={[/ip firewall address-list remove numbers=$i;]}
: import address-list.rsc ;
}

works very well !!!

Thank you very much! sadeghrafie

Liviu

:smiley: karma :smiley:

/ip firewall address-list remove [find]

is all it takes to clear address-list

Thanks. There is always a new way. cause I was interested of programming, mine goes too long :wink: