[Gambas-user] My first rodeo in using the network component

Gianni Piccini pastrano at ...431...
Thu Mar 26 02:49:15 CET 2009


On Tue, 24 Mar 2009 18:35:02 -0501 M0E Lnx <m0e.lnx at ...626...> wrote:

> Would you mind explaining how your method works?

After the late reply, I can be probably more useful :-), also if it is
not Gambas stuff...

You can run a bash script with ftp. For example, I put every night some
files on my site. Access is not anonymous, so I put username and
password. They are defined in /home/username/.netrc, in this way.
I think you should use command dir, because it permits to get a locale
file with listing (see man ftp). Sorry if I don't test script now, but
it's very late here.

--- .netrc

machine  host.ftpserver.com
login    yourusername
password yourpwd

Then, the bash script to run

#! /bin/sh
ftp <<**
open host.ftpserver.com
dir hostdir/hostfiles /home/username/listing.txt
bye
**






More information about the User mailing list