File Transferring
-
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 :)
-
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 :)
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 )