I’ve wrote a scrpit in my mikrotik router to send me a backup file through email. It was working fine since upgrade router OS to 7.18.2. After upgrade it is saying
input does not match any value of file (/tool/e-mail/send (file); line 9)
:local EMAIL “it@tlpk.com”
:local PASSWORD “xxxxx”
:local TIME ([/system clock get time])
:local DATE ([/system clock get date])
:local FILENAME “Backup $[/system identity get name]-$[/system clock get date]”
:local MESSAGE “Please see attached file…”
/system backup save name=$FILENAME password=$PASSWORD
/delay 10
/tool e-mail send file=$FILENAME to=$EMAIL subject=“Your MikroTik backup file as of $DATE $TIME” body=$MESSAGE
There seem to have been changes recently to the way the cli completes commands.
Make sure your $FILENAME variable exactly matches the full filename of the backup with any extension. It will no longer be matched without the extension.
Note:
I think it was this change from 7.18
*) console - do not autocomplete arguments when match is both exact and ambiguous;