Re: subtle gotcha in 10.3.3 Finder copying on networked disk
Re: subtle gotcha in 10.3.3 Finder copying on networked disk
- Subject: Re: subtle gotcha in 10.3.3 Finder copying on networked disk
- From: Andrew Oliver <email@hidden>
- Date: Sun, 21 Mar 2004 10:05:19 -0800
On 3/21/04 9:47 AM, "Charles Arthur" <email@hidden> wrote:
>
But which version of rsync? My "man rsync" shows a line (in the options for
>
what it can copy) saying " Note that in all cases (other than listing) at
>
least one of the source and destination paths must be local." Does local
>
there include "on the Appletalk network you're connected to"? Because
>
otherwise, neither of my locations is local.
As far as rsync is concerned, anything on your desktop is local.
rsync has the ability to copy files to/from a remote machine over a telnet
(yuk) or ssh connection. In this case one of the locations is remote (e.g.
one side is your machine and the other is on the other end of a ssh
connection).
Mounted volumes always appear as local as far as rsync is concerned.
One other observation regarding your script is that I would change the
command ordering such that instead of:
>
duplicate selection to folder "Edhns" of folder "Desks" of folder "Indy Home"
of item "Daily News"
>
set theselection to selection
>
set label index of item 1 of theselection to 6
you:
>
set theselection to selection
>
duplicate theselection to folder "Edhns" of folder "Desks" of folder "Indy
Home" of item "Daily News
>
set label index of item 1 of theselection to 6
In this latter case you're storing the current selecting in a variable and
always referencing that. The subtle difference is only apparent if the
selection changes during the duplication - for example, 'fileA' is selected
when you invoke the script, but during the duplicate process (which could
take a while, especially with networked volumes) you could change the
selection (either purposely, or accidentally -such as a click of the mouse
or an errant keystroke) to 'fileB'.
By the time the 'set label index' command runs there's a chance that the
current selection is different from that when you invoked the script.
By storing the selection at the beginning of the script, you're not reliant
on the selection staying the same by the time you get to the end.
An alternative option would be to make the script a droplet so that you
could drop the files onto the script icon and have them copied
appropriately. This can be even more reliable than the 'selection' option.
Andrew
:)
>
On Sun, 21 Mar 2004 09:40:26 -0700, LuKreme <email@hidden> wrote:
>
>
>
> On Mar 21, 2004, at 4:20 AM, Charles Arthur wrote:
>
>> For a long time I've had a script, bound to a key combo, to copy
>
>> stories
>
>> I've written from one (Appletalk) networked drive to another location
>
>> on
>
>> the same drive.
>
>
>
> I would use rsync<1> to do this and put it in a crontab so that it
>
> happened automatically.
>
>
Neat. Except that I want to copy *only* the stories that I particularly
>
want to send to my newsdesk, and they need to happen *right away*. Syncing
>
everything, and on a crontab, would be both overkill and late; I have lots
>
of things that I'm working on at any given time, but not all are ready to
>
go over.
>
>
Sometimes Applescript *is* the best solution :-) though I can certainly
>
see the benefits of rsync in this context too; I'd just tie the rsync
>
script to my key combo.
>
>
But which version of rsync? My "man rsync" shows a line (in the options for
>
what it can copy) saying " Note that in all cases (other than listing) at
>
least one of the source and destination paths must be local." Does local
>
there include "on the Appletalk network you're connected to"? Because
>
otherwise, neither of my locations is local.
>
>
Charles
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.