Solved

Set Target Folder

Posted on 2014-11-26
3
137 Views
Last Modified: 2014-11-27
How do you set the ftp target folder using .Net Framework 4.5?

Here's what I have:

Imports System.Net

Public Class FTPPlus2
   Shared Property HostName As String
   Shared Property Password As String
   Shared Property UserID As String
   Shared Property Target As String
   Shared Property ID As String
   Shared Property SiteName As String

   Shared Property request As FtpWebRequest
   Shared Property response As FtpWebResponse

   Shared Sub Disconnect()
      If response IsNot Nothing Then
         response.Close()
      End If
   End Sub

   Shared Sub Connect()
      request = DirectCast(WebRequest.Create(String.Format("ftp://{0}", HostName)), FtpWebRequest)
   End Sub

   Shared Sub ChangeCurrentFolder(FolderName)

   End Sub

   Shared Function Connected As Boolean
      Dim ret As Boolean  = False

      Return ret
   End Function

   Shared Sub Login()
      request.Credentials = New NetworkCredential(UserID, Password)
   End Sub
End Class

Open in new window

0
Comment
Question by:Ray Turner
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 11

Accepted Solution

by:
louisfr earned 500 total points
ID: 40467345
The ftp target folder will be the one you put in your uri.
If you create your request using ftp://www.foobar.com/folder1/test.htm, the target folder will be /folder1
0
 

Author Closing Comment

by:Ray Turner
ID: 40469958
Thanks!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question