Help with AppleScript to create a file alias

Another way to do something like this would be to tag the files in that folder.

When I do this EagleFiler’s records list shows the Kind of the record as Alias, and the viewer shows the icon with the arrow at the lower left corner. Is that what you mean?

I don’t see (or expect) any difference doing it this way, but perhaps I’m not understanding what you mean by “move it to the new folder.” Perhaps you are importing in a way that EagleFiler is following the alias and importing a copy of the original file instead of an alias?

Here’s an example of how to import a file that was created by Finder:

tell application "EagleFiler"
    set _records to selected records of browser window 1
    tell library document 1
        set libPath to file of root folder
        set theOutputFolder to choose folder with prompt ¬
            "Select the destination folder" default location libPath
        
        repeat with _record in _records
            set _file to _record's file
            tell application "Finder"
                set _finderAliasFile to make new alias file at theOutputFolder to _file
                set _aliasAlias to _finderAliasFile as alias
                set _aliasPath to _aliasAlias's POSIX path
            end tell
            set _aliasFile to _aliasPath as POSIX file
            -- This would work except that you can't import a file that's already in the library folder
            -- because of the location of theOutputFolder.
            -- import files {_aliasFile}
            
            -- So we scan instead so that EagleFiler notices the new file.
            scan for new files
        end repeat
    end tell
end tell