0

I am trying to copy multiple (1000s) .JPG files from remote SFTP server to current server using mget command but it is not working. Here is the command that I used

sftp username@sftp.domain.com
sftp> cd /images
sftp> mget *.JPG

Screenshot:

enter image description here

Nothing happens so when I do CTRL + C it gives an error that says File "/images/*.JPG" not found.

I have already referred all suggestions posted on the forum but nothing is working. Let me know if there is another way to copy.

Pierre.Vriens
  • 1,159
  • 34
  • 15
  • 19
Kevin S
  • 3
  • 2

3 Answers3

3

If I am not mistaken, and it may be version/flavor dependent, sftp does not have an mget option as ftp does. Assuming this is a *nix type system, take a look at the man page to verify syntax. It may be that trying get instead of mget will work.

user225493
  • 46
  • 1
2

Try using a plain get, from the man page

Retrieve the remote-path and store it on the local machine. If the local path name is not specified, it is given the same name it has on the remote machine. remote-path may contain glob(3) characters and may match multiple files. If it does and local-path is specified, then local-path must specify a direc- tory.

Alternatively you could use scp.

user9517
  • 115,471
  • 20
  • 215
  • 297
0

Why not use

scp -r username@sftp.domain.com:/fullpath/images/*.JPG /your/path/destination

Note that the names are case sensitive and verify if you are in the correct path on your cd command.

Shu Hikari
  • 131
  • 4