Skip to content
Advertisement

How to get list of files in directory smb libcurl?

I’m trying to get a list of files in the directory with libcurl from the SMB server. But I have a error:

curl -u "DOMAINlogin:password" smb://fs/january/soft
curl: (56) Failure when receiving data from the peer

curl -u "DOMAINlogin:password" smb://fs/january/soft/
curl: (56) Failure when receiving data from the peer

If I try to get the file then everything will be okay:

curl -u "DOMAINlogin:password" smb://fs/january/soft/asn1ve.rar > 1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 9103k  100 9103k    0     0  4056k      0  0:00:02  0:00:02 --:--:-- 4055k

Advertisement

Answer

It is not currently supported by libcurl. It is however mentioned in the TODO as something that we’d like to see added one day.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement