You dont need to make a complicated batch/bash script, its simpler and more reliably to use .lftp own scripting

as a added bonus it simpler to port to other systems

mirror from server (download)

  • Edit code for your needs
  • lftp.exe -f /cygdrive/c/lftp/mirrorfrom.lftp

mirror to server (upload)

  • Edit code for your needs
  • lftp.exe -f /cygdrive/c/lftp/mirrorto.lftp