[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


FTP file upload

Posted on 2007-08-01
Medium Priority
Last Modified: 2013-11-29
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
Question by:kuclu
  • 2
LVL 53

Expert Comment

ID: 19607941

Author Comment

ID: 19610985
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??
LVL 53

Accepted Solution

Dhaest earned 1000 total points
ID: 19614399
There's a VB.NET FTP sample in Group 1 at:

Here is a good article in vb:

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Please see preceding article here: http://www.experts-exchange.com/Networking/Operating_Systems/A_11209-Root-Bridge-Election.html Figure 1 After Root Bridge has been elected, then what?..... Let's start by defining a Root Port in la…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question