image
image

|

Ticket Options
Question Details
TICKET ARCHIVE -> Apple Scripting
Mickwilli - Apr 8, 2006 - 5:25 am
image
image
Hi Guys

I wish to learn Apple Script at some time but I need to make something fast.
I want to make a script that deletes a users desktop file and then logs off.

This is for a corprate computer that a single user account is used for lot's of people. It just means that we can shedule it to keep things clean.

Thanks

Mike

smithkennedy - Apr 8, 2006 - 7:50 pm
image
image
If you enable "Remote Login" on each of the hosts you need to clean up, this enables you to log in via a terminal over SSH. You can then just do something like the following (this may or may not work, don't blame me if it does bad stuff):

#!/bin/bash
for HOMEDIR in `ls -1 /Users`; do
for ITEM in `ls "$(HOMEDIR)/Desktop/"`; do
rm -rf "$(ITEM)"
done
done


Mickwilli - Apr 8, 2006 - 8:08 pm
image
image
I'd much rather an Apple Script that we could shedule on the actuall computers. I 'm not great with the Unix side of things. I'd like to have something simple that doesn't require someone to sit down and do it.

Thanks

IF THIS IS YOUR QUESTION AND YOU WISH TO RESPOND, LOGIN HERE FIRST.


Search Engine Friendly URLs by vBSEO 3.1.0