Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

automate SFTP upload

505 views
Skip to first unread message

Király

unread,
Jun 18, 2013, 12:16:13 PM6/18/13
to
Is there any way I can easily automate this, either with applescript or
Automator:

sftp username@host
<enter password>
put <filename>
<wait for upload to complete>
exit

My idea is to select the file in Finder and then choose the script from
the script from the Scripts menu bar item, and the rest is done
automatically.

If there's a GUI app (cheap or free) that makes it this easy I'd be open
to that too. Thanks in advance.

--
K.

Lang may your lum reek.

gtr

unread,
Jun 18, 2013, 1:03:39 PM6/18/13
to
On 2013-06-18 16:16:13 +0000, Király said:

> Is there any way I can easily automate this, either with applescript or
> Automator:
>
> sftp username@host
> <enter password>
> put <filename>
> <wait for upload to complete>
> exit
>
> My idea is to select the file in Finder and then choose the script from
> the script from the Scripts menu bar item, and the rest is done
> automatically.

That should be relatively easy to do, as simple scripts like this
always get me a pretty direct response hereabouts. I'd recommend
running AppleScript Editor, hitting "record", doing what you want to do
and then examining the resultant script for efficiencies.

> If there's a GUI app (cheap or free) that makes it this easy I'd be open
> to that too. Thanks in advance.

FileChute might do what you want. I love it.

Király

unread,
Jun 18, 2013, 1:05:51 PM6/18/13
to
Kir�ly <m...@home.spamsucks.ca> wrote:
> If there's a GUI app (cheap or free) that makes it this easy I'd be open
> to that too. Thanks in advance.

Found Fugu; it's doing the job nicely.

gtr

unread,
Jun 18, 2013, 2:38:57 PM6/18/13
to
On 2013-06-18 17:05:51 +0000, Király said:

> Király <m...@home.spamsucks.ca> wrote:
>> If there's a GUI app (cheap or free) that makes it this easy I'd be open
>> to that too. Thanks in advance.
>
> Found Fugu; it's doing the job nicely.

Good to know, I'll check it out.

Jolly Roger

unread,
Jun 18, 2013, 10:13:51 PM6/18/13
to
In article <kpq14d$jve$1...@dont-email.me>, m...@home.spamsucks.ca (Kir�ly)
wrote:
I'd do it with an AppleScript and the do shell command to do an rsync or
scp instead. One shot and you're done.

--
Send responses to the relevant news group rather than email to me.
E-mail sent to this address may be devoured by my very hungry SPAM
filter. Due to Google's refusal to prevent spammers from posting
messages through their servers, I often ignore posts from Google
Groups. Use a real news client if you want me to see your posts.

JR
Message has been deleted
Message has been deleted

Wes Groleau

unread,
Jun 18, 2013, 11:08:33 PM6/18/13
to
If any of sftp, ssh, or scp works, they all should work.

scp = secure copy (see the man page)

They all work on the Mac OS side, the other end is the question.

And there are ways to store authentication info on each end so that a
password is not required.

Wes Groleau

unread,
Jun 18, 2013, 11:13:26 PM6/18/13
to
On 06-18-2013 22:22, Lewis wrote:
> I've even started using rsync to move and copy files locally.
>
> alias rmv='rsync -a --remove-source-files --stats -h '
> alias rcp='rsync -a --stats -h '

It's a cool idea, but I wonder whether it saves anything.

rsync speeds up file transfer by not sending fewer bits over the wire.
But each host has to read the whole file to determine which bits to send.

So I would expect it to be slower than cp when both ends are local.

I've thought this for a long time but have been to lazy to test it.
Message has been deleted

Jolly Roger

unread,
Jun 19, 2013, 10:16:55 AM6/19/13
to
In article <kpr7cd$mqi$1...@dont-email.me>,
I think you're right. rsync also has lots of comparison overhead before
the copy begins.

Jolly Roger

unread,
Jun 19, 2013, 10:17:23 AM6/19/13
to
In article
<chine.bleu-F7D35...@news.eternal-september.org>,
Siri Cruise <chine...@yahoo.com> wrote:

> In article <slrnks25og....@mbp55.local>,
> Lewis <g.k...@gmail.com.dontsendmecopies> wrote:
>
> > In message <jollyroger-A2776...@news.individual.net>
> > Jolly Roger <jolly...@pobox.com> wrote:
> > > In article <kpq14d$jve$1...@dont-email.me>, m...@home.spamsucks.ca (Király)
> > > wrote:
> >
> > >> Is there any way I can easily automate this, either with applescript or
> > >> Automator:
> > >>
> > >> sftp username@host
> > >> <enter password>
> > >> put <filename>
> > >> <wait for upload to complete>
> > >> exit
> > >>
> > >> My idea is to select the file in Finder and then choose the script from
> > >> the script from the Scripts menu bar item, and the rest is done
> > >> automatically.
> > >>
> > >> If there's a GUI app (cheap or free) that makes it this easy I'd be open
> > >> to that too. Thanks in advance.
> >
> > > I'd do it with an AppleScript and the do shell command to do an rsync or
> > > scp instead. One shot and you're done.
> >
> > I've even started using rsync to move and copy files locally.
> >
> > alias rmv='rsync -a --remove-source-files --stats -h '
> > alias rcp='rsync -a --stats -h '
>
> You can also use expect to automate typing in commands.

That's a kludge though. No thanks. Use the right tool for the job, I say.
0 new messages