• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Deleting "cached" items from the volumes folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Deleting "cached" items from the volumes folder


  • Subject: Deleting "cached" items from the volumes folder
  • From: MR_THEOBALD <email@hidden>
  • Date: Fri, 18 Apr 2008 13:48:55 -0400

Greetings to all...

Earlier in the week I posted a request for some help with deleting a folder which gets "cached" when some of our kindergarten students turn off a machine without ejecting a shared volume prior to the shutdown. The client computers "cache" or store an alias or duplicate folder of the share point in the volumes folder. I've written a script to move the suspect folder(s) to the trash when a new user logs into the machine, however, since the folder was created by a different user, the new user needs to input an admin password to complete the deletion. I want all of that to be performed for the new student before the windows are all closed. All works as is expected except for being able to perform the action as an admin user.

Am I asking a stupid ?? here or is it possible to do this? I've searched and searched and attempted a multitude of samples to get this to work without success. Any help would be appreciated even if it is: "That's pretty easy to do RTFMS." Excuse the simplicity... I'm new to applescript.

Thanks again for any input and have a joyous weekend!

Regards,

Joe

sample script:

tell application "Finder"
activate
make new Finder window
set target of Finder window 1 to item "Volumes" of startup disk
end tell
tell application "Finder"
if exists item "BasicSkillsData-1" of item "Volumes" of startup disk then delete item "BasicSkillsData-1" of item "Volumes" of startup disk
if exists item "BasicSkillsData-2" of item "Volumes" of startup disk then delete item "BasicSkillsData-2" of item "Volumes" of startup disk
if exists item "BasicSkillsData-2" of item "Volumes" of startup disk then delete item "BasicSkillsData-2" of item "Volumes" of startup disk
if exists item "BasicSkillsData-3" of item "Volumes" of startup disk then delete item "BasicSkillsData-3" of item "Volumes" of startup disk
close every window
end tell


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Deleting "cached" items from the volumes folder
      • From: "J. Stewart" <email@hidden>
  • Prev by Date: Re: Is there the equivalent of "any item of"
  • Next by Date: Re: Is there the equivalent of "any item of"
  • Previous by thread: Re: Is there the equivalent of "any item of"
  • Next by thread: Re: Deleting "cached" items from the volumes folder
  • Index(es):
    • Date
    • Thread