• 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
Re: cleaning my desktop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cleaning my desktop


  • Subject: Re: cleaning my desktop
  • From: Peter Baxter <email@hidden>
  • Date: Sat, 6 Oct 2007 15:42:32 +1000

A simple start for your script could be:

set the source_folder to path to desktop folder as alias
tell application "Finder"
set the item_list to desktop
set desktopFiles to every item of the desktop
repeat with i from 1 to number of items in the item_list
try
set this_item to item i of the item_list
end try
set myProperties to kind of this_item
if myProperties contains "Document" then
try
move item i to folder "Documents" of home with replacing
--> you will need an error system to ensure that you don't replace newer versions of your files
end try
end if
if myProperties contains "Movie" then
try
move item i to folder "Movies" of home with replacing

end try
end if
end repeat
end tell



Peter J Baxter mail: email@hidden

It's easy to play any musical instrument: all you have to do is touch the right key at the right time and the instrument will play itself.
-- J.S. Bach



_______________________________________________ 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: cleaning my desktop
      • From: Peter Baxter <email@hidden>
References: 
 >cleaning my desktop (From: "William Chu" <email@hidden>)
 >Re: cleaning my desktop (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: Bad Characters from UnicodeŠ
  • Next by Date: Re: cleaning my desktop
  • Previous by thread: Re: cleaning my desktop
  • Next by thread: Re: cleaning my desktop
  • Index(es):
    • Date
    • Thread