How to download multiple files at a time using mget command from FTP Server without pressing y everytime

ftpwget

I want to download multiple files from a FTP server (Android app). I used FTP client and mget command (Ubuntu Terminal). But it prompts me to enter y or n for every file that I want to download. I have 1000 files to download. I can not enter y for 1000 times to download 1000 files. I am searching for a solution to do the same work easily.

What I tried:

user1@system ~ $ ftp
ftp> open 192.168.43.1 2221
Connected to 192.168.43.1.
220 Service ready for new user.
Name (192.168.43.1:dipankar): android
331 User name okay, need password for android.
Password:
230 User logged in, proceed.
Remote system type is UNIX.
ftp> cd /storage/ABC5-1DF1/DCIM/Camera/
250 Directory changed to /storage/ABC5-1DF1/DCIM/Camera
ftp> mget *
mget Aqua Ring_20180113_105853.jpg? y
200 Command PORT okay.
150 File status okay; about to open data connection.
226 Transfer complete.
361166 bytes received in 0.08 secs (4.0927 MB/s)
mget Aqua Ring_20180113_110130.jpg? y

Solution:

user1@system ~ $ wget -r ftp://username:password@192.168.43.1:2221/storage/ABC5-1DF1/DCIM/Camera/

Best Answer

In interactive ftp mode you can use

prompt

before

mget *

This will assume y to all question.

This feature of ftp has been around since "invention" of ftp.

Related Question