EDIT: Here’s an updated version which adds EagleFiler notes to the Spotlight Comments.
This script deletes EagleFiler records, while leaving the associated files in place. This process effectively hides the files from EagleFiler. OpenMeta tags assigned to the files in EagleFiler are preserved, and EF notes are added to Spotlight Comments “Hidden” files can be imported anew into EF, but they must first be moved out of the EF folder to another location. Most of the script is from Michael’s “Duplicate Records” script](http://c-command.com/scripts/eaglefiler/duplicate-records). Thanks, Michael!
-Steve
(* Hide Selected Records from EagleFiler
Version 2
This script deletes records from the EagleFiler library but keeps the copies of the files in place.
OpenMeta tags applied in EF are transferred, and EF notes are added to Spotlight Comments.
The script is based on "Duplicate Records" by Michael Tsai (http://c-command.com/scripts/eaglefiler/duplicate-records).
Change from Original Version: Notes added to Spotlight Comments
*)
tell application "EagleFiler"
set theSelection to selected records of browser window 1
set _trash to trash of document of browser window 1
tell library document 1
repeat with theTemplate in theSelection
set _container to theTemplate's container
set _loc to _container's file
set _home to POSIX path of _loc
set theFile to theTemplate's file
-- Add notes, if any, to Spotlight Comments
if has note of theTemplate is true then
set _ntext to note text of theTemplate as text
tell application "Finder"
-- Invisible new line characters
end the next two lines --
set the comment of file theFile to _ntext & "
" & "
" & the comment of file theFile
end tell
end if
set thePath to POSIX path of theFile
set theName to do shell script "basename " & thePath's quoted form
set tempFolder to do shell script "mktemp -d -t 'Temp'"
set tempPath to tempFolder & "/" & theName
do shell script "cp -Rp " & thePath's quoted form & " " & tempPath's quoted form
set the theTemplate's container to _trash
do shell script "cp -Rp " & tempPath's quoted form & " " & _home's quoted form
end repeat
end tell
end tell