Re: Found a chimera
Re: Found a chimera
- Subject: Re: Found a chimera
- From: Yvan KOENIG <email@hidden>
- Date: Tue, 15 Sep 2015 22:30:57 +0200
On Sep 15, 2015, at 03:00 PM, Yvan KOENIG <email@hidden> wrote:
set original to "SSD 500:Users:<theAccount>:Desktop:ligne droite.jpeg" as alias set destination to "Macintosh HD:Users:<theAccount>:Documents:tempo:" as alias
tell application "System Events" moveoriginaltodestination end tell original
The file was correctly moved but what a surprise when I saw what was written in the event log :
--> alias "/Users/<theAccount>/Desktop/ligne droite.jpeg"
As you know, I am curious. So I brought the file back in its original location and ran :
tellapplication "System Events" exists alias "/Users/<theAccount>/Desktop/ligne droite.jpeg" end tell
Second surprise, it returned true.
Is this surprising object described somewhere ?
At first I suspected that "move" really did a "copy" when it goes across volumes, but that's not the case. I have no attached external drives, only a mounted server. When I move from the server to my local drive, the original file takes a while before it disappears, so yes, it still exists as far as the local file manager is concerned (or something like that).
It seems what my old scholar English was not clear enough. The file was correctly moved and was no longer available in its original location.It's why I wrote " So I brought the file back in its original location"
What is puzzling is the fact that the displayed result is a posix path treated as an alias. It would have been more clear if I didn't forgot to write that "SSD 500" is my boot volume (an external SSD). "Macintosh HD" is the mechanical internal HD used as a storage device.
If I used the Finder to move the file, I would got : document file "ligne droite.jpeg" of folder "tempo" of folder "Documents" of folder <theAccount> of folder "Users" of disk "Macintosh HD" of application "Finder" Using System Events I was assuming that I would got : alias "Macintosh HD:Users:<theAccount>:Documents:tempo:ligne droite.jpeg" or "/Volumes/Macintosh HD/Users/yvankoenig/Documents/tempo/ligne droite.jpg"
But getting the posix path of the original location described as an alias is really - at least for me - puzzling. I was quite sure that using this surprising object in a script this one would error. It didn't !
Yvan KOENIG running Yosemite 10.10.5 in French (VALLAURIS, France) mardi 15 septembre 2015 22:30:50
|
_______________________________________________
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