Android Question SMB1.MakeDir (PCdir ..., ..)

Angelo Messina

Active Member
Licensed User
Longtime User
Hi samba works fine except SMB1.MakeDir (PCdir ..., ..) (SOLVED)

do you know why


thanks
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
do you know why
As you are not providing any useful info to help you it is nearly impossible to help.

Start with posting the FULL error you get.
Which sms library you are using?
Are you sure the SMB1 protocol is enabled on the server you want to access? The variablename suggest you are using SMB1...
 
Last edited:
Upvote 0

Angelo Messina

Active Member
Licensed User
Longtime User
In fact, it all works with
upload and downlod except mkdir

check in result with these sub

B4X:
Sub SMB1_DownloadCompleted (Url As String, RemoteFile As String, Success As Boolean)
    If Not(Success) Then
        Log("Download failed : " & LastException)
    Else
        Log("Download : " & RemoteFile & " downloaded")
    End If
End Sub

Sub SMB1_UploadCompleted (Url As String, RemoteFile As String, Success As Boolean)
    If Not(Success) Then
        Log("File " & RemoteFile & "Upload failed : " & LastException)
    Else
        Log("Upload : " & RemoteFile & " uploaded")
    End If
End Sub

Sub SMB1_FreeSpaceCompleted (Url As String, RemoteFile As String, Size As Long, Success As Boolean)
    If Not(Success) Then
        Log("GetFreeSpace failed : " & LastException)
    Else
        Log("GetFreeSpace : " & Url & " " & NumberFormat2(Size, 1, 0, 0, True) & " bytes free")
    End If
End Sub

Sub SMB1_MakeDirCompleted (Url As String, RemoteFile As String, Success As Boolean)
    If Not(Success) Then
        Log("MakeDir failed : " & LastException)
    Else
        Log("MakeDir : " & RemoteFile & " created")
    End If
End Sub

Sub SMB1_CopyCompleted (DestUrl As String, DestRemoteFile As String, Success As Boolean)
    If Not(Success) Then
        Log("CopyFile failed : " & LastException)
    Else
        Log("CopyFile : " & DestRemoteFile & " copied")
    End If
End Sub

Sub SMB1_DeleteCompleted (Url As String, RemoteFile As String, Success As Boolean)
    If Not(Success) Then
        Log("DeleteFile failed : " & LastException)
    Else
        Log("DeleteFile : " & RemoteFile & " deleted")
    End If
End Sub

Sub SMB1_RenameCompleted (Url As String, DestRemoteFile As String, Success As Boolean)
    If Not(Success) Then
        Log("RenameFile failed : " & LastException)
    Else
        Log("RenameFile : " & DestRemoteFile & " renamed")
    End If
End Sub

example:

B4X:
 SMB1.MakeDir(DirectoryPC&"/Tmp","")
 Wait For SMB1_MakeDirCompleted(Url As String, RemoteFile As String, Success As Boolean)
 If Success Then
  ToastMessageShow("Directory Tmp Ok",False)
 Else
  ToastMessageShow("Directory Tmp NON ESEGUITO",True)
 End If
 
Upvote 0
Top