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.FileSystemEventA rgs) 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
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
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
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??
Any other help please??
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.freevbcode.com/ShowCode.asp?ID=4655