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?

-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

  • Welcome on superuser. With time links can become obsolete or not working and the related answer will result useless. In order to avoid it try to write the main idea of the link you post. – Hastur Dec 9 '14 at 14:51
  • Thank you so much , I searched for available commands for mget , but couldn't find the skip option! – jholmie2 Dec 9 '14 at 14:54
  • Im confused , how to add the skip option? Say I use mget * to fetch all files , mget * skip don't work , or is my syntax wrong? – jholmie2 Dec 9 '14 at 15:48
  • I used like this > MGET *.* "C:\My documents*.*" skip and that results with Cannot find list of remote files. – jholmie2 Dec 9 '14 at 15:58
  • 1
    The answer uses a completely different ftp client than the OP, without bothering to mention it. – Martin Prikryl Jul 30 '15 at 5:58
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)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.