Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
A

Aadira

@Aadira
About
Posts
1
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • how to upload a textfile to another server through ftp using vb.net---Please its urgent
    A Aadira

    Hi, You can actually create a windows service with filesystemwatcher, which keeps watching the creation of any new text files. The code within the windows service looks something similar to the below: Protected Overrides Sub OnStart(ByVal args() As String) InitializeEventLog() InitializeFileWatcher() InitializeMailServer() End Sub In the InitializeFileWatcher, specify the ftp folder path and add an event handler, Private Sub InitializeFileWatcher() fsWatcher = New FileSystemWatcher fsWatcher.Path = "\\FTP\Folder\*.txt" fsWatcher.NotifyFilter = (NotifyFilters.DirectoryName Or NotifyFilters.FileName) fsWatcher.IncludeSubdirectories = True 'watcher.NotifyFilter = NotifyFilters.FileName 'watcher.NotifyFilter = NotifyFilters.DirectoryName ' Only watch text files. fsWatcher.Filter = "*.txt" ' Add event handlers. AddHandler fsWatcher.Created, AddressOf OnTextFileCreated ' Begin watching. fsWatcher.EnableRaisingEvents = True End Sub so, in the OnTextFileCreated sub procedure, load the data from text file to the local server Private Sub OnTextFileCreated(ByVal source As Object, ByVal e As FileSystemEventArgs) 'Code for loading text data to local server-database End Sub So, whenever there are new text files created in the specified FTP folder, the event is raised and the text file data is loaded to the server. Vidya

    Visual Basic csharp sysadmin tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups