For one, I would advise against trying to fit all your code on one line.
In addition to being more like to bring out bugs, long lines make the code practically unreadable, and will seriously hamper your debugging efforts.
By a quick glance at your script, you may find this useful: http://forum.mikrotik.com/t/backup-file-naming/5165/1
–Eric