smbclient connect from Linux to Windows Directory

7.2k Views Asked by At

I need to connect from Linux to Windows to copy some files. My Windows directory looks like this: \Server\Pucblic\dir\offline\etc I tried: smbclient -U user%pw \Server\Public\dir\offline\etc Also

smbclient -U user%pw \\Server\Public --directory dir\offline\etc

nothing worked.

But When i try connecting to \Server\Public - that ist working...

1

There are 1 best solutions below

0
On

Try these commands

Note: Try to use front slash as below.

smbclient -U user%pw //Server/Public --directory dir/offline/etc

If you want to copy files from single command line try :

smbclient -U user%pw //Server/Public --directory dir/offline/etc -c 'put "yourfilename"'