• 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: A little help with a folder cleanup script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A little help with a folder cleanup script


  • Subject: Re: A little help with a folder cleanup script
  • From: "J. Stewart" <email@hidden>
  • Date: Wed, 9 Aug 2006 05:09:08 -0400

On 8/8/06 at -0400 Rick Davis said this

>This year I want to clean up last years network home directories to
>prepare for a new year. But I want to leave a list of folders alone
>and move everything else into the documents folder.
>
>This is the list of allowed folders:
>
>Desktop
>Documents
>Downloads
>Library
>Movies
>Music
>Pictures
>profile
>Public
>Roaming Media
>Sites
>

<snip>

>
>Any and all suggestions greatly appreciated.


Something like this should do it though it needs a bit of error checking.

Be careful of line wraping.

--> Cut <--
set aList to {"Desktop", "Documents", "Downloads", "Library", "Movies", "Music", "profile", "Public", "Roaming Media", "Sites"}
set usrFold to path to current user folder
set DocFold to path to "docs"
tell application "Finder" to move (get (every item of usrFold whose name is not in aList) as alias list) to DocFold
--> Cut <--

JBS
--
How many of you believe in telekinesis?  Raise my hand...
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >A little help with a folder cleanup script (From: Rick Davis <email@hidden>)

  • Prev by Date: Re: A little help with a folder cleanup script
  • Next by Date: Re:Printing to PDF from Safari
  • Previous by thread: Re: A little help with a folder cleanup script
  • Next by thread: rsync and backup
  • Index(es):
    • Date
    • Thread