Re: Help: Auto Upgrade Data from FTP



In article <f7tcot$c5n$1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Andrés García <fandom@xxxxxxxxxxxxxxxxxxxxx> wrote:

If today was 2007-7-21, and I had got these logs before 2007-7-19, it
would download the logs between 2007-7-20 to 2007-7-21.

For example:

package require TclCurl

for {set i 0} {1} {incr i} {
set date \
[clock format [expr [clock seconds]-24*$i*3600] -format %Y-%m-%d]
if {[file exist $date.log]} break
curl::transfer -url ftp://192.168.0.1/$date.log \
-userpwd "user:pwd" -file $date.log
}

Andres


.... and if, for some reason, installation of TclCurl proves difficult,
<URL: http://phaseit.net/claird/comp.unix.programmer/ftp_automation.html >
has many alternatives.
.



Relevant Pages

  • Re: [opensuse] How do I keep monitor from going to sleep
    ... in this case freedom has little to do with fact ... installation using rpm package manager program. ... They exist only if particular package is missing software that will ... also little to do with real reason for their existence. ...
    (SuSE)
  • Trying to build TclCurl on Sun 5.8
    ... Any body got TclCurl to compile properly on SUN 5.8? ... It seems to compile but when doing the package require, ... ld.so.1: tcl: fatal: lib ...
    (comp.lang.tcl)