Just use the full pathname and get a script to generate the list for you, eg
'find'.
But you need to know if the directory exists on the remote site.

Anyone know, assuming a shell is not available to the remote host, can you
test for the existance of a directory on an ftp site in order to make a
decision as to whether to make a directory or not?
Something like if [ -d ] dirname ; then do something ; fi
but using ftp as the only available protocol?

(Actually come to think of it you could possibly use http to first test for
this directory's existence if the ultimate aim was to update your website).

Regards,

Jill.

-- 
Jill Rowling, Snr Des. Eng. & Unix System Administrator
Eng. Systems Dept, Aristocrat Technologies Australia
Level 2, 55 Mentmore Ave Rosebery NSW 2018
Phone: (02) 9697-4484 Fax: (02) 9663-1412 Email: [EMAIL PROTECTED]
 


-----Original Message-----
From: Bernhard L�der [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 12 March 2002 22:07
To: Peter Hardy; SLUG user group
Subject: [SLUG] ftp client - MORE


Ok, that works for known files, but what if I have to upload new directories
& folders with files in them?

Is there a recursive feature in ftp?

Bernhard

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Peter Hardy
Sent: Tuesday, 12 March 2002 19:33
To: SLUG user group
Subject: Re: [SLUG] ftp client


On Tue, 2002-03-12 at 18:50, Bernhard L�der wrote:
> Can I use the native RedHat ftp client to automate this task?
> How do I get it to log in as a user, then transfer files and the log out
> after?

It's fairly easy to use ftp in shell scripts.  I used to use the
following to upload webcam images to the webserver.

uploadpic() {
    ftp -v -i -n $host <<EOF
    user $ftpuser $ftppasswd
    binary
    put $localfilename $remotefilename
    bye
EOF
}

HTH,
--
Peter


----------------------
CONFIDENTIALITY NOTICE
----------------------
This email is intended only to be read or used by the addressee.
The information contained in this e-mail message may be confidential
information. If you are not the intended recipient, any use, interference
with, distribution, disclosure or copying of this material is unauthorised
and prohibited. Confidentiality attached to this communication is not waived
or lost by reason of the mistaken delivery to you.

If you have received this message in error, please delete it and notify us
by return e-mail or telephone Aristocrat Technologies Australia Pty Limited
on +61 2 9413 6300.
--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to