Re: [Activetcl] Incorparating FTP into tcl scripts
by Talvo Hornblower other posts by this author
Oct 18 2007 11:49AM messages near this date
view in the new Beta List Site
Re: [Activetcl] Incorparating FTP into tcl scripts
|
Re: [Activetcl] Incorparating FTP into tcl scripts / also for SFTP?
The ftp package is a part of Tcllib. It's included with ActiveTcl distributions, but you can
also download the code from SourceForge. It's page on the wiki (http://wiki.tcl.tk/1246) po
ints to further pages telling you where to find it and how to install it.
Regards,
Mike
----- Original Message -----
From: Gene Osteen
To: Richard Toohey ; activetcl@[...].com
Sent: Thursday, October 18, 2007 7:45 PM
Subject: Re: [Activetcl] Incorparating FTP into tcl scripts
First, thanks to everyone who are answering my initial query. I tried to run a very simple
script and got the following message:
Error: can't find package ftp
while executing
"package require ftp "
(file "test_ftp_1.tcl" line 3)
tom.vericlaim.com>
Obviously something very basic is going wrong. Can anyone tell me how to tell if I have th
e ftp package and how to install it if I don't?
Gene Osteen
803-649-7486
Confidentiality Notice: The electronic mail and/or documents accompanying this transmissio
n contain confidential information belonging to the sender, which is legally privileged. The
information is intended only for the individual's) or entity named above. If you are not th
e intended recipient you are hereby notified that any disclosure, copying, distribution or t
aking of any action in reliance on the contents of this information is strictly prohibited.
If you have received this transmission in error, please immediately notify us by email or te
lephone to arrange for return or to destroy the original document. Thank You.
------------------------------------------------------------------------------
From: Richard Toohey [mailto:richard.toohey@[...].nz]
Sent: Thursday, October 18, 2007 2:39 PM
To: Talvo Hornblower; Gene Osteen; activetcl@[...].com
Subject: RE: [Activetcl] Incorparating FTP into tcl scripts
We have used the ftp client in tcllib in fairly heavy (100s+ Mb), daily, production use fo
r the last couple of years with no real issues (it can die somewhere in its guts if there ar
e connection problems at the other end - never found out exactly where or why, but know if i
t happens then there are problems at the other end.)
Running on Windows, FreeBSD, and OpenBSD.
What has worked well is having a job that is purely responsible for sending the files - ke
ep the ftp out of your other script(s).
Your "client" script(s) build a list / database of files to be transmitted, and then your
ftp script tries as many times to send the files as you want to try. That way your FTP logi
c can be kept in one place. Make sure you check results and use catch.
Other than that, it works as it says on the packet ... http://tcllib.sourceforge.net/doc/f
tp.html
------------------------------------------------------------------------------
From: activetcl-bounces@[...].com [mailto:activetcl-bounces@[...].com] On Behalf Of Talvo
Hornblower
Sent: Friday, 19 October 2007 5:55 a.m.
To: Gene Osteen; activetcl@[...].com
Subject: Re: [Activetcl] Incorparating FTP into tcl scripts
Hi Gene,
There's an FTP package available as part of Tcllib which may well do what you need. You ca
n find the docs for it at http://tcllib.sourceforge.net/doc/ftp.html - it's pretty simple to
use, and has always worked well for me in the past. I have occasionally had issues with the
timing out unexpectedly, though, and although they never gave me any major problems (I was
using it manually), you might need to watch for that more carefully in an automated program.
Regards,
Mike
----- Original Message -----
From: Gene Osteen
To: activetcl@[...].com
Sent: Thursday, October 18, 2007 5:48 PM
Subject: [Activetcl] Incorparating FTP into tcl scripts
All,
I've never used FTP inside tcl. I am running TCL 8.2 on UNIX boxes and 8.4 o
n WINDOWS machines. I am planning on using TCL to run as a scheduler and on of the things th
at will need to be done is moving files between platforms. Any advice on how to approach thi
s would be most helpful.
Gene Osteen
803-649-7486
Confidentiality Notice: The electronic mail and/or documents accompanying this transmiss
ion contain confidential information belonging to the sender, which is legally privileged. T
he information is intended only for the individual's) or entity named above. If you are not
the intended recipient you are hereby notified that any disclosure, copying, distribution or
taking of any action in reliance on the contents of this information is strictly prohibited
. If you have received this transmission in error, please immediately notify us by email or
telephone to arrange for return or to destroy the original document. Thank You.
----------------------------------------------------------------------------
_______________________________________________
ActiveTcl mailing list
ActiveTcl@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
------------------------------------------------------------------------------
_______________________________________________
ActiveTcl mailing list
ActiveTcl@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Gene Osteen
Robert M Bartis
Talvo Hornblower
Tillmann Basien
Hillel Seltzer
Robert M Bartis
Richard Toohey
Gene Osteen
Talvo Hornblower
|