move with System Events
move with System Events
- Subject: move with System Events
- From: "koenig.yvan" <email@hidden>
- Date: Sat, 23 Nov 2013 17:13:53 +0100
Hello
In Mavericks, the function move a disk item is no longer flagged as UNAVAILABLE YET :
move v : Move disk item(s) to a new location. move disk item : The disk item(s) to be moved. to location specifier : The new location for the disk item(s).
So, I tried to use it.
I ran this piece of code :
set originalFile to choose file of type {"com.adobe.pdf"} --> alias "Macintosh HD:Users:yvankoenig:Desktop:azer50.pdf" set finalLocation to path to documents folder as text
tell application "System Events" move disk item (originalFile as text) to folder finalLocation end tell
As I got the path to the original file thru choose file, I'm sure that it really exists but the script returns an odd :
error "Erreur dans System Events : Il est impossible d’obtenir disk item \"Macintosh HD:Users:yvankoenig:Desktop:azer50.pdf\"." number -1728 from disk item "Macintosh HD:Users:yvankoenig:Desktop:azer50.pdf"
which is really foolish.
Am I doing something wrong or is System Events playing the fool ?
Yvan KOENIG (VALLAURIS, France) samedi 23 novembre 2013 17:13:41
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden