attempt to read write file 2

kalarius

Active Member
Licensed User
Longtime User
I have use the smb library

dim smb1 as smb


smb1=intialize("smb1")

smb1.setCredentials("user1",1234","")

I have make the events sub

sub smb1_donloadfilecompleted (.........................)
log(status)
end sub



the proble is that nothing happens with the
smb1.downloadFile("smb://olduser/fakelos","sms.txt","/mnt/sdcard","sms.txt")

no event raise after the execution

it create the sms.txt at the sd card
but it does not get the file form the olduser machine
the olduser is windows XP pro machine and the user1 have password 1234
the other computers can get files from olduser

please advice
 

abner69

Member
Licensed User
Longtime User
If working with XP, you will also need to supply the workgroup or domain in your credentials.

I have written a small example and noted within the file on how to list, download files.

I used this app to communicate with both XP and windows 7 computers.

Hope this helps!

...Pablo
 

Attachments

  • com.ifn.example.smb.zip
    7.6 KB · Views: 389
Upvote 0

MrKim

Well-Known Member
Licensed User
Longtime User
I cannot get this to work. I have some public directories but no matter which ones I choose (Win 7 by the way - No Domain) when using listfiles I always get Success=True but all that is returned is the name of my Workgroup.
I tried setcredetntials and then all I get is an error telling me it is an invalid user name or password and then listfiles fails.
Please help
Update: After additional testing I find I can type ANYTHING and then a colon (eee:, 33333:, etc: ) and it will always return the workgroup and say it is a directory.
SMB1.ListFiles("eee:", "") returns
URL = EEE
Entries = 1
Entires(1).Name=MyWorkgroup/
Directory=True
Parent=smb://
LastModified=12/31/1969

But the above is all I ever get.
By the way there is no Password on the computer.

Update, got it working. I think I used back slashes "\" instead of forward "/" (but I also turned on network discovery) it would be nice to have a meaningful error instead of the successful return I was getting above.

But other than that - THANK YOU FOR THIS!
 
Last edited:
Upvote 0

swamisantosh

Member
Licensed User
Longtime User
If working with XP, you will also need to supply the workgroup or domain in your credentials.

I have written a small example and noted within the file on how to list, download files.

I used this app to communicate with both XP and windows 7 computers.

Hope this helps!

...Pablo
thanks for the code it was very much helpful.
I'm was trying the SMB library since last i would not get the solution, But your code help me...thanks
 
Upvote 0
Top