i have a long list with all my user and i want to take to other mt i got.
thxs in advance
i have a long list with all my user and i want to take to other mt i got.
thxs in advance
Export compact to a file and copy the bits you want?
thank you so much for your quick answer.
please tell me how to do that.
i dont see export menu.
From a terminal.
Click “New Terminal”, type
/queue simple export file="queues.txt"and hit enter.
thank you
it works !!
1-other question how can u save just the name field?
2-or can it be save in xls format?
hehe
Not directly and/or easily.
To export just the names, you could create a custom script at “/system script”, but you’d have to learn scripting for that.
For Excel, it’s even harder. The easiest way is to create a CSV file using scripting. Alternatively, if you know any programming language (C, PHP, JAVA, C#, etc.), you could connect to the router using the API protocol and use whatever other libraries are available to that language to programmatically create Excel files.
can u help me with that?
do you have a script that would help me with that?
this is the way i made the queues.
:for e from=3 to=254 do={
/queue simple add name=“user $e” target-addresses=“10.0.0.$e” max-limit=244000/2804000 queue=default/default total-queue=default
}
I think the following should work generating a list of names (one per row)
:local “filename” “queue_names.txt”;
#Create a (nearly) empty file to overwrite later
/file print file=$filename where 1=0;
:local contents “”;
/queue simple
:foreach “queue” in=[find] do={
:set “contents” ($contents . [get $queue “name”] . “\n”);
};
/file set $filename contents=$contents;I think Excel might be able to extrapolate that into a column of values, but I’m not sure. If it doesn’t, you’d have to figure out what it does and does not accept from text files before reworking the script accordingly.
i ll be happy just to get a txt with field name only, the excel file will be a bonus ![]()
i did what you told me and i get an error and a txt file with everything instead of just field name.
here it is what is said
[admin@MikroTik] > :local “filename” “queue_names.txt”;
[admin@MikroTik] >
[admin@MikroTik] > #Create a (nearly) empty file to overwrite later
[admin@MikroTik] > /file print file=$filename where 1=0;
syntax error (line 1 column 19)
[admin@MikroTik] > :local contents “”;
[admin@MikroTik] > /queue simple
[admin@MikroTik] /queue simple> :foreach “queue” in=[find] do={
{… :set “contents” ($contents . [get $queue “name”] . “\n”);
expected variable name (line 2 column 10)
[admin@MikroTik] /queue simple> };
[admin@MikroTik] /queue simple> /file set $filename contents=$contents;
syntax error (line 1 column 12)
[admin@MikroTik] /queue simple>
you must post that into the script editor on menu “system script”, then run it. not just command line anywhere