473,395 Members | 1,556 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Ftp Client Help

Hi, all. new to this ftp stuff. i found this information on the msdn,
but i don't understand some things. why won't this code resolve to a
IP based ftp server? how can i download everything at this site
without a GUI? Thanks ahead of time.

Imports System.IO
Imports System.Net
Imports System.Text

Public Class SimpleFTPClient
Public Function download() As FtpStatusCode
Try

sqlUser = "xxx"
sqlPass = "xxx"
sqlIP = "xxx.xxx.xxx.xxx"

Dim ftpRequest As FtpWebRequest =
CType(WebRequest.Create(sqlIP), FtpWebRequest)

ftpRequest.Method = WebRequestMethods.Ftp.DownloadFile

Dim ftpResponse As FtpWebResponse =
CType(ftpRequest.GetResponse, FtpWebResponse)
Dim stream As Stream = Nothing
Dim reader As StreamReader = Nothing
Dim writer As StreamWriter = Nothing
Dim destinationFile As String
destinationFile = "C:\FrankSilvaFTP"
Try
stream = ftpResponse.GetResponseStream
reader = New StreamReader(stream, Encoding.UTF8)
writer = New StreamWriter(destinationFile, False)
writer.Write(reader.ReadToEnd)
Return ftpResponse.StatusCode
Finally
stream.Close()
reader.Close()
writer.Close()

End Try
Catch ex As Exception
Throw ex
End Try

End Function
Public sqlUser As String
Public sqlPass As String
Public sqlIP As String
End Class

Sep 27 '06 #1
1 1199

<jo***********@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Hi, all. new to this ftp stuff. i found this information on the msdn,
but i don't understand some things. why won't this code resolve to a
IP based ftp server? how can i download everything at this site
without a GUI?
Why do you want to?

Sep 28 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Justin Stockton | last post by:
I recently upgraded from ActivePython 2.2.2 to ActivePython 2.3.2 and I'm running into an issue importing the win32com.client module. Before installing the new version, I made sure to properly...
4
by: Arun Goel | last post by:
I have installed Oracle client & Oracle database(9.2.0.4) on Red Hat 9.0. It seems to me everything went fine in installation as I followed notes from...
6
by: Oliver Stratmann | last post by:
Hello All, we tried to set up a DB2-client for one customer. The situation was as follows: There are already DB2-Clients which are configured for the relevant DB2-databanse. We exported the...
0
by: Tim Northrup | last post by:
Help! We have DB2 V7.2 (fixpak 12) installed on Windows2003 Server, and the latest V7.2 client installed on another system. The DB2CODEPAGE on all systems is set to 1208, and the database was...
4
by: Yasaswi Pulavarti | last post by:
On an AIX server, I used the db2install script from the command line to install the DB2 UDB 8.1 client. I applied the fix pak 7 to it. Now I need to use the client to test connections to another...
11
by: Timothy Shih | last post by:
Hi, I am having a freezing issue with my application. My application serves several remotable objects, all of which must be initialized before their use. Furthermore, some of them depend on each...
0
by: Russ | last post by:
I have set up a C# web application that runs on my test Web Server (Windows 2003 Server, Web Edition). It in turn calls a web service running on the internal network. Now I want to issue a...
9
by: Harry Smith | last post by:
While reading the documentation on IsStartupScriptRegistered, there is a reference to "client startup script" as "Determines if the client startup script is registered with the Page object." What...
12
by: ShepardBerry | last post by:
This may be a dumb question, but I'm not finding anything specifically what I'm looking for. Still kind of new to .NET as well. What I'm trying to do that I know I could do in VB6.0/ASP is to...
0
by: 85ssp | last post by:
I am creating a small server client program that is meant for up to 70 connections from 70 different computers on a network. Everything in the program functions correctly except when testing...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.