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

Re: desktop


  • Subject: Re: desktop
  • From: Frank Watzl <email@hidden>
  • Date: Tue, 23 Jan 2001 14:46:18 +0100

Hi,

You want to exclude the startup disk from being copied, o.k.
I guess that you probably also want to exclude mounted disks other than the startup disk from the duplication process, don't you?
With this assumption being true, the following code works on my machine (MacOS 9.1)
If you actually want to include non-startup disks inot the duplication process, you need to

set xcludeList to {} & name of startup disk & name of trash

in the code below.

If you ask the Finder for folders, it will return disks and the trash as well as "real" folders, so you must filter these items before duplicating.

The trash on localized systems is named other than "Trash", which i guess is it's "visible" name on US-systems.
For that reason I am excluding it by it's name. On German Systems for example it is named "Papierkorb", which is what you both see (in then GUI) and get (after asking the Finder for <name of trash>). Anyway: the code below isn't tested on US systems, and I'd appreciate some feedback about it's behaviour on your machine.

best regards,

Frank Watzl

--begin script
tell application "Finder"
set xcludeList to {} & name of disks & name of trash --exclude disks and trash
set FolderList to (folders of desktop) whose name is not in xcludeList
set FileList to files of desktop
set dupList to FolderList & FileList
duplicate dupList to folder "Destfolder" of disk "Dilbert" --change destfolder according to your needs
end tell
--end script

At 16:15 Uhr -0500 22.01.2001, carver wrote:
>I'm trying to copy the entire contents of the desktop (excluding the hard
>drive and trash) to another folder using applescript but I can't get it to
>work. I've tried the following:
>
>duplicate every file of the desktop to the folder "Desktop Folder" of folder
>"Documents" of startup disk - this only moves the files but doesn't move
>folders
>
>If I try:
>
>duplicate the entire contents of the desktop to the folder "Desktop Folder"
>of folder "Documents" of startup disk - this doesn't even work for some
>reason
>
>What else can I try?
>_______________________________________________
>applescript-users mailing list
>email@hidden
>http://www.lists.apple.com/mailman/listinfo/applescript-users


References: 
 >desktop (From: carver <email@hidden>)

  • Prev by Date: CLEANING QUARK PARA'S
  • Next by Date: Re: Switching PPP & TCP/IP configurations with AS.
  • Previous by thread: desktop
  • Next by thread: Delay
  • Index(es):
    • Date
    • Thread