convert date to string backup file

i want create file backup with .rsc file, format file=config+date ex:config dec/12/2008.rsc

:global date [/system clock get date];
:global tgl [:tostr $date ];
/export file=(“config” . “” .$tgl);

was error " file name "

any one could help me.

The slashes are the problem. Remove them with ‘pick’:

:global thisdate [/system clock get date]
:global datestring ([:pick $thisdate 7 11] . [:pick $thisdate 0 3] . [:pick $thisdate 4 6])

The variable $datestring today is 2008dec15