1

I would like to capture the progress information during downloads. I have tried, for example from a cmd prompt:

c:\Windows\ncftpget ftp://speedtest.tele2.net/1MB.zip > mylog
c:\Windows\ncftpget ftp://speedtest.tele2.net/1MB.zip >> mylog
c:\Windows\ncftpget ftp://speedtest.tele2.net/1MB.zip > mylog 2>&1

Mylog is always written with 0 bytes, unless the file to be downloaded is already present. In that case I get a 92 byte error message. The problem seems specific to ncftpget. It works with Windows 10 ftp.

JLM
  • 11
  • 1

1 Answers1

1

You need to use -d /path/to/log.txt

ncftpget -d /tmp/ncftpget.log <url>

Example output:

2018-12-01 03:49:33 Cmd: USER anonymous
2018-12-01 03:49:33 331: Password required for anonymous
2018-12-01 03:49:33 Cmd: PASS NcFTP@
2018-12-01 03:49:35 530: Login incorrect
2018-12-01 03:49:35 Cmd: QUIT
2018-12-01 03:49:35 221: Goodbye

wuseman
  • 1,259
  • 12
  • 20
  • Thank you wuseman, much appreciated. That gets me 75% of the solution. I wanted to include also the ncftpget command itself with the options and url. I guess I can send them to the log separately. But I'm curious why the normal redirect methods don't work. – JLM Dec 03 '18 at 03:59