• 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
A quick question about moving files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A quick question about moving files


  • Subject: A quick question about moving files
  • From: patrick machielse <email@hidden>
  • Date: Fri, 09 Sep 2005 13:51:00 +0200

I'm trying to move the contents of folder 'A' to folder 'B'. I need to move all files, including invisibles, so I need to use "System Events", not "Finder" (correct me if I'm wrong).

Using Finder the following works for visible files:

tell application "Finder"
    set t1 to folder "test1" of desktop
    set t2 to folder "test2" of desktop

    move entire contents of t1 to (t2 as string)
end tell

For "System Events" I'm trying

tell application "System Events"
    set t1 to folder "test1" of desktop folder
    set t2 to folder "test2" of desktop folder

    move disk items of t1 to (path of t2)
end tell

The result value here is: {missing value, missing value, missing value}

It seems I'm _missing_ something. I'm think it should be something trivial, because I believe I had 'move' working before, but at the moment I just don't see my mistake...

I'm now using do shell script "mv ..." (which under 10.4 should be safe?) but I'd rather not. Any help is much appreciated.

patrick,
bloody beginner

_______________________________________________
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


  • Follow-Ups:
    • Re: A quick question about moving files
      • From: Sander Tekelenburg <email@hidden>
    • Re: A quick question about moving files
      • From: Laine Lee <email@hidden>
    • Re: A quick question about moving files
      • From: Yvan KOENIG <email@hidden>
  • Prev by Date: Re: Creating a folder on the desktop (recap)
  • Next by Date: Re: A quick question about moving files
  • Previous by thread: [ANN] AppleScript Pro
  • Next by thread: Re: A quick question about moving files
  • Index(es):
    • Date
    • Thread