Link to home
Start Free TrialLog in
Avatar of kuclu
kuclu

asked on

FTP file upload

Hi. I have a filesystemwatcher that launches a program. This program would then generate a number of html pages and these are stored in a folder. My question is this: How can I upload these html files to a server through ftp. below is my code.
thanks in advance for your help.

'=================================================

Imports System.ServiceProcess
Imports System.IO
Imports System.Threading.Thread
Imports System.Windows.Forms
Imports System.Diagnostics

Public Class Service1

    Protected Overrides Sub OnStart(ByVal args() As String)
        ' Add code here to start your service. This method should set things
        ' in motion so your service can do its work.
    End Sub

    Protected Overrides Sub OnStop()
        ' Add code here to perform any tear-down necessary to stop your service.
    End Sub

    Private Sub FileSystemWatcher1_Changed(ByVal sender As System.Object, ByVal e As System.IO.FileSystemEventArgs) Handles FileSystemWatcher1.Changed

        Dim procAs New Process
        proc= Process.Start("C:\Program Files\\html_program.exe")

''''here i need carry out an ftp upload of the generated files


    End Sub
End Class
Avatar of Dirk Haest
Dirk Haest
Flag of Belgium image

Avatar of kuclu
kuclu

ASKER

tnx dhaest, but the example only downloads files, and it is not possible to upload a file. Also, i do not need an interface, i only need to run the upload in the background.
Any other help please??
ASKER CERTIFIED SOLUTION
Avatar of Dirk Haest
Dirk Haest
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial