-- Group Records
-- https://c-command.com/scripts/eaglefiler/group-records
-- Summary: Creates a new folder and moves the selected records into it.
-- Requires: EagleFiler
-- Install Location: ~/Library/Scripts/Applications/EagleFiler/
-- Last Modified: 2019-05-24



tell application "EagleFiler"
    set _records to selected records of browser window 1
    tell library document 1
        set _parent to container of item 1 of _records
        set _folder to add folder name "Group" container _parent
        repeat with _record in _records
            set container of _record to _folder
        end repeat
        tell browser window 1
            set selected records to {_folder}
        end tell
    end tell
end tell
