Netscape Communicator: Clear Disk Cache Now

Hello everyone,

First, this list is fantastic, a very good resource, many thanks for the replies I have received in the past.

Question,

Is there a way to script to tell Netscape Communicator to clear the disk cache?

In GUI world this occurs by going to the preferences menu, selecting advanced, selecting cache, and selecting clear disk cache now.

For this application I am using Netscape Communicator 4.7, OS 9.2.1, Script editor 1.8.3 on a Beige G3.

Thanks a bunch in advance for any help you can provide on this topic!!!

Frank

Frank,

Maybe a Finder script would work for you. The following script works for me but you need to do 1 thing first. Navigate to your cache folder for the user you want to work with. Clear the cache from within Netscape. Now look in the folder and make a copy of the CCache log file that Netscape puts out there - put it somewhere safe and plug the path into the script below.

This script
–>Deletes every file of the user’s cache folder
–>Makes a copy of the CCache log file to the cache folder, much like Netscape does


property username : "d" --d= the user name of the profile you want to delete the cache for
property pathToCache : "Mac HD:System Folder:Preferences:Netscape Users:" & username & ":Cache ƒ:"
property CCachelog : "Mac HD:System Folder:Preferences:Netscape Users:" & username & ":Back Up Cache:CCache log"
--the file above is what Netscape places in the cache folder when you clear the cache.  make a copy of
--it and place it somewhere safe
tell application "Finder"
	--delete every file of folder pathToCache --delete every file in the cache folder using standard Finder commands
	--or if you use deletefile from Jon's Commands you won't need to empty the trash
	set theFiles to every file of folder pathToCache
	deleteFile theFiles
	duplicate file CCachelog to folder pathToCache --dupe a copy of what Netscape uses as an initial cache log to the Cache ƒ folder
	--enable if not using Jon's Command's deletefile command --empty trash --optional, the previous CCache Log will be in use and will toss up a trash dialog
end tell

Hope this does the trick for you,