using smbget to download multiple files

I need to download multiple files from a video server. The files are available in following ways

  • \\fileserver\directory\file1.txt
  • \\fileserver\directory\file2.txt
  • \\fileserver\directory\file3.txt

from a suse linux server I am using smbget like below

smbget smb://fileserver/directory/file1.txt smb://fileserver/directory/file2.txt smb://fileserver/directory/file3.txt
Username: domainname\user
password: ******

But it downloads only the first file whereas the man page, clearly says below

smbget [-a, --guest] [-r, --resume] [-R, --recursive] [-u, --username=STRING] [-p, --password=STRING] [-w, --workgroup=STRING] [-n, --nonprompt] [-d, --debuglevel=INT] [-D, --dots] [-P, --keep-permissions] [-o, --outputfile] [-f, --rcfile] [-q, --quiet] [-v, --verbose] [-b, --blocksize] [-O, --stdout] [-?, --help] [--usage] {smb://host/share/path/to/file} [smb://url2/] [...]

Isnt it pretty clear that multiple files can be given in a single command? why its not working?

1 Answer

If you have all the files in the same directory, you can use -R to recursively download the whole directory containing the files:

smbget -R smb://fileserver/directory

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like