Ftp – Batch File Syntax to get files from FTP server

ftpscripting

I have trouble getting all files from an FTP Server. Usually I get all files using the command line/terminal with syntax the following syntax: get a.txt (very, very time wasting with login authentication first)

So, my expectation is I wanna get all file from FTP server, with a script(batch), So I'm not wasting my time using the terminal/command line. I just want to run the script. Of course, login authentication needs to be included in the script. How would I do this?

Best Answer

Save yourself a whole lot of trouble trying to script this with a FTP client. Download ncftp, and use that.

Basically:

ncftpget -R ftp://user:password@host/path/to your files

-R means it does a recursive transfer