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