Applescript to add file to a folder within a library

The command:

tell library document "EF Miscellaneous.eflibrary"
import files {a_file}

adds a file to library unfiled. Is there any way to send it to a folder within the library?

Not at present, except that you could try to figure out which record was added most recently and then change its container to the folder that you want. Making it possible to set the destination folder is near the top of my to-do list.

EagleFiler 1.2 adds a container parameter to the import command, so that you can specify which folder the items should be imported into.

Is it possible to import into a sub folder?
I was only able to import into folders in root.

Yes, for example you could do something like this:

tell application "EagleFiler"
    tell library document 1
        set _child to library record "Child" of library record "Parent" of root folder
        set _path to "/Users/you/Desktop/MyFile"
        set {_record} to import files {POSIX file _path} container _child
    end tell
end tell

Thanks for the super fast answer.