can't send file with date in the name ?

Hello ,
very strange problem

I want to send to my ftp a file with the date and the time it was created
so I have this :

:global time [/system clock get time];
:global date [/system clock get date];
:global full ($time.$date);
/tool fetch mode=ftp user=david password=david12 address=10.0.0.111 src-path=myfile.txt dst-path="test/myfile$full.txt" upload=yes;

I get

status: failed
failure: Unrecognized FTP server response: 451 Requested action aborted: No such file or
directory

when I write the name of the file like this:

/tool fetch mode=ftp user=david password=david12 address=10.0.0.111 src-path=myfile.txt dst-path="test/myfile$date.txt" upload=yes;

doesn’t work
when I write jsut the time it does work

/tool fetch mode=ftp user=david password=david12 address=10.0.0.111 src-path=myfile.txt dst-path="test/myfile$time.txt" upload=yes;

when I print out the $date \ $ full
I see the right time and date

how could it be?

Thanks ,

Probably the date or time contain characters that are invalid in a file name, e.g. /

you are right
in the date I have “/”
didn’t think about it

Thanks ,

Ok, with a Linux/Unix FTP server it will work fine, but when your FTP server is on Windows it will also fail
on the time because ‘:’ is an invalid character on Windows as well.
It is best to use a date/time format that does not have separator characters, like 201604041747 for the current time.
I don’t know how to quickly achieve that in the MikroTik scripting language, I have not used that yet.