1. *** New version of B4J is available ***
    B4J v7.8
    Dismiss Notice

Android Question SMB Download-Append-Upload

Discussion in 'Android Questions' started by ElliotHC, Jul 30, 2019.

  1. ElliotHC

    ElliotHC Active Member Licensed User

    I've been having some trouble trying to download, append and upload a file in a shared folder on a windows 7 laptop over a wifi network.

    I'm using this code.

    Private rp As RuntimePermissions
    Private FilePath As String
        FilePath = rp.GetSafeDirDefaultExternal(

    "smb://Engineering-pc/Test"DateTime.Date(DateTime.Now) & ".txt",FilePath,DateTime.Date(DateTime.Now)  & ".txt")

    Dim Writer As TextWriter
    File.OpenOutput(FilePath, DateTime.Date(DateTime.Now) & ".txt"True))
    ",Here is some appended text.")' or writeline for CR
    DateTime.Date(DateTime.Now)  & ".txt","smb://Engineering-pc/Test"DateTime.Date(DateTime.Now) & ".txt")
    But nothing seems to happen.

    Also, I can't see where even this file is supposed to end up on the device to be able to check if it's even downloaded it.

    Does anyone have a working example of this? I would have assumed that without any error message in the log it worked.. Although my file is unchanged
  2. ElliotHC

    ElliotHC Active Member Licensed User

    Forgot the last forward slash in the Filepath :rolleyes:
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice