Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: Sam on May 05, 2003, 03:31:56 AM
-
Hi
Im trying to create a automated ftp script.
I have a few problems when i try and run it.
its run from a sep script which runs the command
ftp -i -n domain.com < output.txt
output.txt consists of
user username passwd
ascii
put filename
close
bye
When i run this i get the following error
: No such file or directory
I have tried running this by
typing ftp -i -n domain.com
and then just pasting output.txt into the window and it all runs fine and uploads the file. the only way it works automated is if i remove the put filename command which kinda renders it useles. this has me completely stumped as i cant see any obvious error.
Any help would be much appreciated.
Thanks
Sam
-
I'm not sure what is causing your problem, but if you want to ftp from a script, you better use ncftpput. It's already installed on your machine and specifically written for this purpose. Try man ncftpput.
Regards,
Michiel
-
bash: ncftpput: command not found
it doesnt seem to be installed by default. Is it worth installing it?! and would u know of whr i could find the rpm for it?!
thanks
Sam
-
Oups, sorry. It's one of these tools I install automatically on an SME box, so I assumed everybody has it :-)
Is it worth installing? From the man pages:
The purpose of ncftpput is to do file transfers from the
command-line without entering an interactive shell. This
lets you write shell scripts or other unattended processes
that can do FTP.
So I gues it does what you're looking for.
You can download the ncftp tools from http://ftp.redhat.com/pub/redhat/linux/9/en/os/i386/RedHat/RPMS/ncftp-3.1.5-4.i386.rpm
Regards,
Michiel
-
Hi,
What about the mirror command search on freshmeat. Type mirror in search system and see if thats what you need.
Hope this helps
Byte
-
http://www.star-support.com/downloads/mitel/contrib/weex/
IMHO much easier to setup than mirror.
Example config:
[dnet]
HostName = wwww.elsewhere.com
LoginName = user
Password = secret
SrcDir = /home/e-smith/files/ibays/web/html/dnet
DestDir = /
IgnoreRemoteDir = /test
Run thru "weex -m dnet"
-
try using ftpfs..u can mount an ftp as a directory....and is easier ..cuz u handle the remote ftp as a local directoryMarco wrote:
>
> http://www.star-support.com/downloads/mitel/contrib/weex/
> IMHO much easier to setup than mirror.
>
> Example config:
>
> [dnet]
> HostName = wwww.elsewhere.com
> LoginName = user
> Password = secret
> SrcDir = /home/e-smith/files/ibays/web/html/dnet
> DestDir = /
> IgnoreRemoteDir = /test
>
> Run thru "weex -m dnet"
-
Neat. Where do I find ftpfs? Would it for example allow me to mount ftp.redhat.com/pub as a local folder and than map it to a drive on a Windows client (using samba/netlogon.bat).
Michiel