Given a set of XML files available on a Windows Share \\server\share contains spaces\direcory\, I need a bash command to download one specific file from that share.

Neither wget nor curl support any smb:// URI, and I'd like to avoid the mount command. Solutions?

link|improve this question

76% accept rate
feedback

1 Answer

up vote 3 down vote accepted

smbclient can be scripted to upload or download files using the -c option. Syntax is similar to ftp.

e.g.

smbclient -I [server IP] "//servername/path with spaces/" -c "get [filename]"

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.