Help with exporting configuration

Hi all,

This is my first post.

I’ve been playing around with the mikrotik API for a few months. I’ve got stuck with one of the commands I’m trying to send though. I’m using an ASP.NET page with C#. The class I’m using to connect to the API is the default one I found on the site.

Anyway this is what I’m trying to be able to export to a specific file:

(once I’ve successfully loged in, I send this)

mikrotik.Send(“/export =file=apiex”, true);

If I just send the “/export” with nothing else, it returns "!done!, but the code I just pasted returns this:

message=no such command or directory (export =file=apiex)

What am I doing wrong?

Thanks in advance for any help you can give me.

You should send

            mikrotik.Send("/export");
            mikrotik.Send("=file=apiex", true);

Thanks! This should create a file in the same directory as where my aspx file is, correct? Isn’t it possible to specify a different path?

No, export will always put the file in Router’s root directory.

Aaah ok, thanks for your help.