Here’s a basic script to move selected records
tell application id "DNtp"
set selectedNotes to get selection
repeat with theNote in selectedNotes
set theFilingGroup to get record at "/🗂Filing" in database "Devonthink"
--
-- Additional code to refine value for theFilingGroup
--
move record theNote to theFilingGroup
end repeat
end tell
My script has additional code to set filename, tags …
I added the script as a toolbar icon