This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

FTP

Old posts that have not been replied to for several years.
Locked
J
Jimbo

Post by Jimbo »

Hi, i've been told about a tcl script that can open an ftp list it etc....its called ftp.tcl...Where can i get this from??
Y
Ycarus

Post by Ycarus »

This script is with the distribution of TCL 8.3.
You can also download it on my site : http://yews.fr.st/ (in "Téléchargements" and then "Scripts TCL")

Ycarus
yews@ifrance.com
http://yews.fr.st/
J
Jimbo

Post by Jimbo »

Hi...cheers for it...wicked site btw!!!
Could u tell me what is wrong with this...

Code:

bind pub - !test ftptest

package require FTP 1.2

proc ftptest {nick uhost hand chan text} {
set server <serverip>
set user anonymous
set passwd me@me.com
if {[FTP::Open $server $user $passwd -timeout 45]} {
foreach line [FTP::list] {
putserv "PRIVMSG #TestChannel :$line"
}
}
putserv "PRIVMSG #TestChannel :Could not connect"
}

cheers!!!
Y
Ycarus

Post by Ycarus »

It's an exemple of script I've made... I know it's not really the best way but it work :wink:

Code: Select all

bind pub - !test ftptest 
package require ftp 

proc ftptest {nick uhost hand chan text} { 
   set server "serverip"
   set user "anonymous" 
   set passwd "me@me.com" 
   if {[set connection [ftp::Open $server $user $passwd -port 21 -timeout 45]] >= 0} { 
     set listoffile [ftp::list $connection]
     ftp::Close $connection
     set countelement "0"
     while {$countelement != [llength $listoffile]} {
	putquick "PRIVMSG #testchannel : [lindex listoffile $countelement]"
	incr countelement
     } 
     return 0
} 
putserv "PRIVMSG #TestChannel :Could not connect" 
} 
You can also put "-mode passive" or "-mode active".
J
Jimbo

Post by Jimbo »

Cheers, thanx alot m8!!!

<font size=-1>[ This Message was edited by: Jimbo on 2002-05-26 06:45 ]</font>
J
Jimbo

Post by Jimbo »

Is there any way to get the exact error given....i.e "Access Denied" or "System cannot find the file specified" etc?
Locked