I do want to write all ppp secret details txt file format, The problem is, when i run my code, it only register one name , what could be wrong?
Code: Select all
:local filedata ""
:foreach i in=[/ppp secret find] do={
:local name [/ppp secret get $i name]
:local password [/ppp secret get $i password]
:set $filedata ("$name:$password\n")
}
/file print file="ppp-secrets.txt"
:delay 2
/file set "ppp-secrets.txt" content=$filedata