VanDyke Software Forums

VanDyke Software Forums (
-   Scripting (
-   -   Whether Vralib.dll or sfxcl.exe have a method as WriteFileBytes ? (

secureus 09-25-2014 02:16 PM

Whether Vralib.dll or sfxcl.exe have a method as WriteFileBytes ?
I am working on VS 2012 - .Net Framework 4.0, Vb.Net

I am getting ByteArray as Input paramter from a Front End Application, I want to create the file in the Linux server using sftp connection.

Below is my existing function which writes the file (.csv) in the Linux Server which is working with ftp connection.

Whether SecureFX Client Pack or Sfxcl.exe has some methods to implement WriteFileBytes ? I am comfortable with Vb Script or .Net or batch file or any format of code which can write the ByteArray.


Public Function UploadFileFromStream(ByVal data As Byte(), ByVal fileName As String) As Boolean

        ' Assume FTP authentication is success           

            MyClass.Method = System.Net.WebRequestMethods.Ftp.UploadFile

        ' This function writes ByteArray variable to file                 

            Using request As System.IO.Stream = MyClass.GetRequestStream()

                request.Write(data, 0, data.Length)

            End Using

        Catch ex As Exception

        End Try

Return True

End Function

rtb 09-25-2014 02:29 PM

Hi secureus,

A file must exist locally if you want to use SFXCL to transfer a file.

Please see the following post for direction about your ByteArray question:

All times are GMT -6. The time now is 02:53 PM.