Thanks, your a life saver.
Main Topics
Browse All TopicsI'm looking to create a sub routine in VB.net for my ASP.net application that can connect to a given remote ftp server and create a directory which is named with the string passed to it. i have most of the needed elements such as passing the string and connecting to the ftp server (using FtpWebRequest and its properties).
what i can't find anything on is how to then create a directory or to move around the directory structor, can some one point me in the direction of the correct class to use that can create directories or a tutorial on this area so i can study up on it.
thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: rafayaliPosted on 2008-05-20 at 11:33:55ID: 21608886
Here is the code to use ftp classes to create a directory on remote ftp server:
ocalhost/d irname") s=New NetworkCredential(username ,pw) RequestMet hods.Ftp.M akeDirecto ry equest.Get Response()
Directory
Dim myFTPWebRequest as FTPWebRequest = WebRequest.Create("ftp://l
Dim myFTPWebResponse as FTPWebResponse
myFTPWebRequest.Credential
myFTPWebRequest.method=Web
myFTPWebResponse=myFTPWebR
After this line is executed, the ftp server returns a response which is actually a value to indicate whether the directory was created or not. Also, at this point, if you check your ftp server, the new directory would have been created. You can place additional functionality at this point to do whatever you want, such as refresh you files list, or notify the user, etc. etc.
Let me know if you need anything else.
myftprequest.Method = WebRequestMethods.Ftp.Make
myftpresponse = myftprequest.GetResponse()