1

I have a little script in Windows that opens up a connection to a web server and downloads all the files using mget.

However, the mget constantly downloads the files even if they already exist.

Is there an FTP command that can skip already existing files?

2 Answers2

1

The built-in Windows ftp.exe client does not allow you to skip existing files.

You have to use a different FTP client.


For example with WinSCP, you can use following batch file (.bat):

winscp.com /log=ftp.log /command ^
    "open ftp://username:password@example.com/" ^
    "get -neweronly /path/* c:\path\" ^
    "exit"

Note the -neweronly switch. It makes WinSCP download only non-existing file or file that were updated since the last download.

For details see:

(I'm the author of WinSCP)

-1

Kindly refer http://docs.attachmate.com/reflection/ftp/15.6/guide/en/index.htm?toc.htm?7482.htm once. skip option is available in mget.

e.g. you can use the following line

MGET *.* "C:\My documents*.*" skip

Hastur
  • 19,483
  • 9
  • 55
  • 99
MilesWeb
  • 124