=pod Code submission from: Dave Belcher (dbelcher@cyberhino.com) A simple program that "deletes" the Netscape cache, globalhistory and cookie files (best saved as a droplet for double-click ease of use). =cut ######################################################################### # # # Script Name: cleanup.pl # # Created by: Dave Belcher (dbelcher\@cyberhino.com) # # ----------------------------------------------------------------------# # Current Vers: 1.0 # # Release Date: # # Last Modify: 9/10/97 -- 12:27 AM # # ----------------------------------------------------------------------# # © Copyright 1997, David B. Belcher. All rights reserved. # # # ######################################################################### # Locations $netscape_dir = "Power HD:System Folder:Preferences:Netscape Ÿ"; $netscape_cache_dir = "$netscape_dir:Cache Ÿ"; $global_history_file = "$netscape_dir:Global History"; $cookie_file = "$netscape_dir:MagicCookie"; # Miscellany $beep =sprintf("%c", "7"); # Delete cached files opendir (DIR, "$netscape_cache_dir") || die ("Problem opening $netscape_cache_dir: $!"); @cached_files = readdir DIR; closedir(DIR); foreach $file (@cached_files) { unlink ("$netscape_cache_dir:$file") || die ("Problem with $file: $!"); } # Delete Global History and Cookie if (-e "$global_history_file") { unlink ("$global_history_file") || die ("Problem with $global_history_file: $!"); } if (-e "$cookie_file") { unlink ("$cookie_file") || die ("Problem with $cookie_file: $!"); } # We're done print "$beep$beep"; exit;