• 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: move folder & copy image ? (newbie)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: move folder & copy image ? (newbie)


  • Subject: Re: move folder & copy image ? (newbie)
  • From: Michelle Steiner <email@hidden>
  • Date: Tue, 7 Aug 2001 08:43:46 -0700

On 8/6/01 11:37 PM, T. Breheny / DiGiTAL ZEN <email@hidden> wrote:

>below please find 2 different but similar non-working scripts which should
>shed some light on what i'm _trying_ to do (hopefully):
>
>
>----------
>
>tell application "Finder"
> activate
> select file "output" of folder "clients"
> reveal original item of selection
> open selection
> select every item
> move selection to the folder which contains this folder
>end tell

Well, it appears that "output" is an alias to a folder. Assuming that's
the case, here are my comments.

1. you have to supply the full path name to the file; e.g., file
"output" of folder "clients" of disk "macintosh HD" Personally, I would
use a file path, such as file "macintoshHD:clients:output"

2. you don't have to select it; you can work on it directly by name.

so my line of code would be

set the selectedItem to file "macintoshHD:clients:output"

3. Then instead of revealing the target of the alias, set it to a
variable

set the originalItem to the original item of the selectedItem

4. Then set the container of that folder to a variable

set the parentFolder to the container of the originalItem

5. Then set the contents of the originalitem to a variable

set the filesToBeMoved to the entire contents of the originalItem

6. Finally move the files.

here's the final code:

tell application "Finder"
set the selectedItem to file "macintosh HD:clients:output"
set the originalItem to the original item of the selectedItem
set the parentFolder to the container of the originalItem
set the filesToBeMoved to the entire contents of the originalItem
move the filesToBeMoved to the parentFolder
end tell

--Michelle

----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------


  • Follow-Ups:
    • success! (was Re: move folder & copy image ?)
      • From: "T. Breheny / DiGiTAL ZEN" <email@hidden>
  • Prev by Date: File copy application
  • Next by Date: Re: Getting comments as a list... Delimiters???
  • Previous by thread: Re: move folder & copy image ? (newbie)
  • Next by thread: success! (was Re: move folder & copy image ?)
  • Index(es):
    • Date
    • Thread