TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
arvind kumar
NA
1
2.9k
how to move file from one folder to another folder.
Aug 24 2013 4:56 AM
1.> I have a folder(DirTest) on FTP in which files are coming.
2.> I created another folder(BackupDirTest) using given code below.
private static void CreateFTPDir()
{
FtpWebRequest request = (FtpWebRequest)FtpWebRequest.Create("ftp://FTPServerIP/" + " BackupDirTest");
request.Credentials = new NetworkCredential("anonymous", "anonymous");
request.UsePassive = true;
request.UseBinary = true;
request.KeepAlive = false;
//Console.WriteLine("Getting the response");
request.Method = WebRequestMethods.Ftp.MakeDirectory;
using (var resp = (FtpWebResponse)request.GetResponse())
{
//Console.WriteLine(resp.StatusCode);
FTPdestinationPath = resp.ResponseUri.ToString();
}
}
3.> How to shared this(BackupDirTest) folder using c# code, so that I can get shared path. And I can use below code for moving file from 1 folder to another folder.
File.Move(FTPsourcePath, FTPdestinationPath +"\\"+ FileName);
Because this "Move" function is working in local compute but its not working on FTP Server Why?
Reply
Answers (
0
)
multiline textbox
add authentication in login windowsForm use Iidentity