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.

Download a file from ftp

Old posts that have not been replied to for several years.
Locked
User avatar
sKy
Op
Posts: 194
Joined: Thu Apr 14, 2005 5:58 pm
Location: Germany

Download a file from ftp

Post by sKy »

I have sendftp.tcl by ernst, it`s a nice tool to upload files to ftp. I was looking now for a proc which makes it possible to download a file from ftp. Do someone know a script which has such a funktion?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

Code: Select all

exec wget $fileurl
User avatar
sKy
Op
Posts: 194
Joined: Thu Apr 14, 2005 5:58 pm
Location: Germany

Post by sKy »

ye, nice, but i need this for windrops :/
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

install cygwin wget (uncheck all and then check: web -> wget) and repeat demonds suggestion.
if you dont want to set up the cygwin bin path to the windows path, just call the wget.exe with full path (/cygdrive/c/.../wget.exe) or copy the wget.exe into the windrop dir should be fine as well.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

p

Code: Select all

ackage require http

proc wget {arg} {
  if {![catch {open [file tail [split $arg]] w} wf]} {
    fconfigure $wf -translation binary
    if {![catch {http::data [set token [http::geturl $arg -binary 1 -timeout 9999]]}]} {
      puts $wf "$rd"
    } else {
    	putlog "Failed fetching file"
    }
    close $wf
  }
}
could crash the bot not tested.
XplaiN but think of me as stupid
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

hmm this won't work at all, http package doesn't support FTP
User avatar
sKy
Op
Posts: 194
Joined: Thu Apr 14, 2005 5:58 pm
Location: Germany

Post by sKy »

i heared there is a ftp package too, i will check it out later.
Locked