Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

antipuls3

macrumors newbie
Original poster
Feb 22, 2010
5
0
Hey all! I've been using Macs for awhile, and am growing to love them for sure. I'm starting to dabble with Applescript, and things like that... just delving into the magic of Apple products, and I'm coming up with a few questions, one of which I'm posting here! Thanks for any and all responses!

I'm interested in leaving three icons on the desktop at all times. My "Macintosh HD" icon, a "Lost&Found" folder and a alias to a server I use consistently. All other files I want moved into the Lost&Found Folder on a consistent basis, and I want to delete these files weekly, or bi-weekly. I'm unsure as to if I should make an Applescript for this, or if there's a utility out there to do this. I have looked around a bit already, and haven't found much.

So if anyone could help, that'd be awesome! Thanks so much guys! :)
 
Sounds like you might be able to write a folder action for the purpose. Right-click on desktop -> Configure Folder Actions. I don't know too much about AppleScript, so that's about as far as I can get you. :p
 
Sounds like you might be able to write a folder action for the purpose. Right-click on desktop -> Configure Folder Actions. I don't know too much about AppleScript, so that's about as far as I can get you. :p

I fooled around with that a bit, found nothing, and then tried Automator, which looks promising. I have it set up to "Find Finder Items" on the Desktop, and then another action to move these files to a new folder called Lost&Found. Only thing is, how do I get it to, when "Finding Finder Items", exclude certain aliases and such and only take new files that are created?
 
I fooled around with that a bit, found nothing, and then tried Automator, which looks promising. I have it set up to "Find Finder Items" on the Desktop, and then another action to move these files to a new folder called Lost&Found. Only thing is, how do I get it to, when "Finding Finder Items", exclude certain aliases and such and only take new files that are created?

You need to use if-then-else-end if statements.
 
You can add multiple conditional statements as shown below. Keep in mind they're "all/any", so if you wanted a condition that read something like "(A & B) OR (C & D)", there's some more work involved. The nice thing is Automator can be used to create Workflows, Applications, Services, or Folder Actions depending on what's most appropriate for the need.
 

Attachments

  • Screen shot 2010-03-02 at 1.12.35 PM.png
    Screen shot 2010-03-02 at 1.12.35 PM.png
    26.2 KB · Views: 71
You can add multiple conditional statements as shown below. Keep in mind they're "all/any", so if you wanted a condition that read something like "(A & B) OR (C & D)", there's some more work involved. The nice thing is Automator can be used to create Workflows, Applications, Services, or Folder Actions depending on what's most appropriate for the need.

So... I want all files and folders besides "Macintosh HD, Lost&Found, FCE HD DVD Tutorial alias and NAS2"

How would either exclude these and move everything else, or find all file other than these... and move those? I must be missing something.
 
I don't have Leopard Automator in front of me, but you should be able to select "None" in JNB's screenshot, then list all of the filenames you want to exclude.

You don't need to name any of your hard drives/partitions, since they aren't actually located on your desktop.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.