Disclaimer: Apple does not necessarily endorse any suggestions, solutions, or third-party software products that may be mentioned in the topic below. Apple encourages you to first seek a solution at Apple Support. The following links are provided as is, with no guarantee of the effectiveness or reliability of the information. Apple does not guarantee that these links will be maintained or functional at any given time. Use the information below at your own discretion.
Tired of having to manually delete files in my "Recent Items" folder
even though my prefs are set to not keep recent items, I wrote the
following Applescript to empty the folder for me:
--[SCRIPT]
on adding folder items to this_folder after receiving added_items
tell application "Finder"
delete added_items
end tell
end adding folder items to
on closing folder window for this_folder
tell application "Finder"
set laVersion to product version
if ("-8" is in laVersion) or ("-9" is in laVersion) then open this_folder -- useless with os X
end tell
end closing folder window for
--[/SCRIPT]
(I apologize for the double spacing BUT if I type a single return it is not displaid)
Just compile this in the AppleScript Editor and store it in the Folder Action Scripts folder.
In OS9xx this is located in the System Folder.
In OSX this is located in the Scripts menu in the Menu bar.
In OS9, click the "Recent Items" icon while holding down the
Control key, and the Contextual Menu that opens should display "Attach
script to Folder". Select that to link the script to the
Recent Items folder.
In OSX, if you don't have the Scripts Menu installed, go Applications > AppleScript > Script Menu.menu and double-click "Script Menu.menu" to install the Menu Bar scrip menu icon.
To attach the "Recent Items" folder action script to AW, go to the Script Menu > Folder Actions > Attach Script to Folder. A dialog box opens allowing you to select a script that you want to attach to a folder. A second dialog box will open allowing you to select the target folder.
If you are using OS9, you must open the Recent Items folder to link the
script to the folder. In OS9, and action script won't work if the
folder is closed. You can collapse the folder widow to just the Title
Bar.
You may search for a 16K extension file named "Folder Actions Plus" which
allows folder scripts to work on closed folders.
Anyway, I hope this is helpful.
Thanks to Gene van Troyer which helped me to write the explanations in plain english.
Yvan Koenig (from France)
PS.
Three scripts upon this problem are available in a single archive on my iDisk:
<http://idisk.me.com/koenigyvan-Public?view=web>
Download:
ScriptsforAppleWorks:Recent items.zip
This is the 2nd version of this tip. It was submitted on Feb 28, 2009 by KOENIG Yvan.
Do you want to provide feedback on this User Contributed Tip or contribute your own? If you have achieved Level 2 status, visit the User Tips Library Contributions forum for more information.
Replies