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

Re: A quick question about moving files


  • Subject: Re: A quick question about moving files
  • From: Yvan KOENIG <email@hidden>
  • Date: Fri, 9 Sep 2005 16:10:39 +0200


Le 9 sept. 2005 , à 13:51, patrick machielse a écrit :

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


on my machine, this code is working :

set sFolder to "Macintosh HD:Users:yvankoenig:Desktop:source ƒ:"
set dFolder to "Macintosh HD:Users:yvankoenig:Desktop:destination ƒ::"

tell application "System Events"
	move disk items of (sFolder as alias) to (dFolder as alias)
end tell

Yvan KOENIG

_______________________________________________
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 quick question about moving files (From: patrick machielse <email@hidden>)

  • Prev by Date: A quick question about moving files
  • Next by Date: Need help from a Filemaker Ninja...
  • Previous by thread: A quick question about moving files
  • Next by thread: Re: A quick question about moving files
  • Index(es):
    • Date
    • Thread