Results 1 to 4 of 4

Thread: Script to "hide" selected records

  1. #1

    Default Script to "hide" selected records

    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. Thanks, Michael!


    (* 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 (
    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  \n  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
    Last edited by Steve Samuels; 01-04-2010 at 10:48 AM. Reason: Attached the script

  2. #2


    Thanks for the script. I think people will find it useful. The way I would describe it is that it deletes the EagleFiler records while leaving the files in place. That is, you aren’t telling EagleFiler to hide the files; rather, you are hiding them from EagleFiler. Just to be clear.

    Quote Originally Posted by Steve Samuels View Post
    Tags are preserved in the copy process, but EF notes are not.
    Since (assuming you empty the trash) the files are no longer in EagleFiler, there are no EagleFiler notes or tags on them. There would probably still be OpenMeta tags on the files in the Finder, though.

  3. #3


    Thanks, Michael. I'll rephrase the description. I checked that OpenMeta tags are preserved.
    Last edited by Steve Samuels; 01-03-2010 at 11:55 AM.

  4. #4

    Default New Version adds EF Notes to Spotlight Comments

    I replaced the original script in the first post with one which adds EagleFiler notes to the Spotlight Comments.
    Last edited by Steve Samuels; 01-03-2010 at 09:11 PM.

Similar Threads

  1. Apple Script Question: "phantom" windows
    By commoner in forum EagleFiler
    Replies: 4
    Last Post: 01-22-2010, 10:02 PM
  2. Replies: 2
    Last Post: 10-16-2009, 01:20 PM
  3. New script "Empty Junk Mail Folder" ?
    By RichardG in forum SpamSieve
    Replies: 2
    Last Post: 03-21-2008, 05:01 PM
  4. Replies: 2
    Last Post: 03-20-2008, 11:42 PM
  5. Script to move "Gray" messages to trash
    By tabaholic in forum SpamSieve
    Replies: 2
    Last Post: 03-19-2007, 11:21 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts