Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify destination path using mget command

Tags:

ftp

I am trying to copy multiple files from Linux machine to Windows using mget. Files are getting downloaded, but I'm not able to specify the destination directory (Windows directory)

like image 915
Syed Kashif Pasha Avatar asked Jul 02 '15 06:07

Syed Kashif Pasha


People also ask

How use Mget command in Linux?

To copy a single file, use the get command. To copy multiple files at once, use the mget command. You can supply a series of individual file names and you can use wildcard characters. The mget command copies each file individually, asking you for confirmation each time.

What is Mget command?

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>.

What is difference between GET and Mget?

mget() function in R programming works similar to get() function but, it is able to search for multiple data objects rather than a single object in get() function.

How does Mget work?

mget works by expanding each filename listed and running a get command on each file. The files are copied into the local working directory, which can be changed with the lcd command.


Video Answer


1 Answers

The mget does not allow you to explicitly specify target local directory.

It always downloads the files to the current local working directory.

Though, you can change the local working directory using lcd command:

ftp> lcd C:\path
Local directory now C:\path.
ftp> mget *.*
like image 198
Martin Prikryl Avatar answered Oct 11 '22 00:10

Martin Prikryl