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
  1. Home
  2. General Programming
  3. Visual Basic
  4. File Transferring

File Transferring

Scheduled Pinned Locked Moved Visual Basic
csharpvisual-studiosysadmindebugging
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Michael101
    wrote on last edited by
    #1

    Hi people, Does anyone know how to transfer files from one computer to another (not on the same network). I understand that in VB.NET you have the FTP libraries incorporated in the back end, but I'm not entirely sure on how to use them. I've tried this but it doesn't work, yet! Dim uri As New Uri("file://C:\Documents and Settings\mhomsey\My Documents\Visual Studio 2005\Projects\CareerOneUploader\CareerOneUploader\bin\Debug\GENERATED_XML\Careersmehrmyc20080207.xml") Dim reader As TextReader = File.OpenText(xmlFileName) Dim xml As String = reader.ReadToEnd() If (uri.Scheme = uri.UriSchemeFile) Then Dim request As FileWebRequest = FileWebRequest.Create(uri) Dim response As FileWebRequest = request.GetResponse() Dim reader As New StreamReader(response.GetResponse()) Dim tmp As String = reader.ReadToEnd() response.close() End If The code isn't finished but I just want to be able to send a file from this computer, to another remote computer. Does anyone have the same code? Thanks very much in advance and I appreciate your help. Michael :)

    C 1 Reply Last reply
    0
    • M Michael101

      Hi people, Does anyone know how to transfer files from one computer to another (not on the same network). I understand that in VB.NET you have the FTP libraries incorporated in the back end, but I'm not entirely sure on how to use them. I've tried this but it doesn't work, yet! Dim uri As New Uri("file://C:\Documents and Settings\mhomsey\My Documents\Visual Studio 2005\Projects\CareerOneUploader\CareerOneUploader\bin\Debug\GENERATED_XML\Careersmehrmyc20080207.xml") Dim reader As TextReader = File.OpenText(xmlFileName) Dim xml As String = reader.ReadToEnd() If (uri.Scheme = uri.UriSchemeFile) Then Dim request As FileWebRequest = FileWebRequest.Create(uri) Dim response As FileWebRequest = request.GetResponse() Dim reader As New StreamReader(response.GetResponse()) Dim tmp As String = reader.ReadToEnd() response.close() End If The code isn't finished but I just want to be able to send a file from this computer, to another remote computer. Does anyone have the same code? Thanks very much in advance and I appreciate your help. Michael :)

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Well, to send a file via FTP, an FTP server needs to be set up somewhere.

      Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

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