ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> activetcl
activetcl
Re: [Activetcl] Incorparating FTP into tcl scripts
by Gene Osteen other posts by this author
Oct 18 2007 11:46AM 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
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 the 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 transmission 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 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.

 

________________________________

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 for the last couple of years with no real issues (it can
die somewhere in its guts if there are connection problems at the other
end - never found out exactly where or why, but know if it 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 - keep 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 logic 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/ftp.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 can 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 <mailto:gosteen@[...].com>   

	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 on WINDOWS machines. I am planning on using TCL to
run as a scheduler and on of the things that will need to be done is
moving files between platforms. Any advice on how to approach this would
be most helpful.

	 

	Gene Osteen

	803-649-7486

	 

	Confidentiality Notice: The electronic mail and/or documents
accompanying this transmission 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 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
Thread:
Gene Osteen
Robert M Bartis
Talvo Hornblower
Tillmann Basien
Hillel Seltzer
Robert M Bartis
Richard Toohey
Gene Osteen
Talvo Hornblower

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved