Hi, I want to copy a file with b4j from/to a NAS storage where user and password are required to access.
I tried this little program from the tutorial:
It compiles allright, but the code does nothing. Ok, the template path does not exist, but it not even logs "Hello".
Thanks for advice!
I tried this little program from the tutorial:
B4X:
Sub Process_Globals
Dim SMB1 As SMB
End Sub
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)
Log ("Hello")
' If FirstTime Then
SMB1.Initialize("SMB1")
' End If
SMB1.ListFiles("smb://USER-PC/Users/Public/", "")
End Sub
Sub SMB1_ListCompleted(Url As String, Success As Boolean, Entries() As SMBFile)
If Not(Success) Then
Log(LastException)
Else
For i = 0 To Entries.Length - 1
Log("*****************")
Log(Entries(i).Name)
Log(Entries(i).Directory)
Log(DateTime.Date(Entries(i).LastModified))
Log(Entries(i).Parent)
Log(Entries(i).Size)
Next
End If
End Sub
It compiles allright, but the code does nothing. Ok, the template path does not exist, but it not even logs "Hello".
Thanks for advice!