identify of MT device is: 125-hAP
The script creates the file:
_125-hAP_2024-04-07_.txt
Including the underline characters at the beginning and end of the file
But the fetch command cannot find the file.
Code: Select all
/system
:local cdate [clock get date]
:local yyyy [:pick $cdate 0 4]
:local MM [:pick $cdate 5 7]
:local dd [:pick $cdate 8 10]
:local identitydate "$[identity get name]_$yyyy-$MM-$dd"
/ip/address print file="[$identitydate]"
/tool fetch upload=yes mode=ftp ascii=no src-path="[$identitydate].txt" dst-path="/mikrotik-backups/$[$identitydate].txt" address=192.168.2.22 port=21 user=mikrotik password=mikrotik
/file remove "[$identitydate]"
As well as without the .txt
Did something change in the scripting over the past several RouterOS updates?
Thanks!