I am using ftp in the command line (terminal) to transfer multiple data files from a remote server to my local computer. There are multiple files (~40) in the directory and I would like to transfer them all without having to answer yes in the prompt for each file. I tried mget * but this only transferred the first file and then a prompt popped up for the second file.
The MGET command transfers one or more files matching the given filespec from the FTP server to the PC. You can use wildcards to transfer multiple files. Most servers support wildcards in the <serverspec>.
Use the get command to download individual files. Use the Multiple Get (mget) command with the wildcard character (*) to download all available files in a directory. Most FTP clients provide the ability to rename files as they are retrieved using the get command. This is not usually possible using the mget command.
The mget command is used to retrieve multiple files from a remote server directory and store them in the current local directory.
When you already started ftp
you can issue the prompt
command to toggle between getting prompted and not getting prompted. So this should do the trick:
> ftp <some server>
ftp> prompt
Interactive mode OFF .
ftp> mget *
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With