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
yokzu
NA
306
0
FTP commands on CSharp
Dec 10 2012 8:19 AM
Hi,
I just want to send a file to an FTP server with csharp. Normally I am using these commands on cmd.exe
ftp 12.12.12.12
user
pass
put test.txt
and the file has been sent. But How can do it with Csharp? I tryed something below but it didnt work.
string parametre1 = "/C ftp 12.12.12.12";
string parametre2 = "/C username";
string parametre3 = "/C password";
string parametre4 = "/C put c:\test.txt";
Process islem = new Process();
islem.StartInfo.FileName = "C:\\Windows\\System32\\cmd.exe";
islem.StartInfo.Arguments = parametre1;
islem.StartInfo.Arguments = parametre2;
islem.StartInfo.Arguments = parametre3;
islem.StartInfo.Arguments = parametre4;
islem.StartInfo.RedirectStandardOutput = true;
islem.StartInfo.UseShellExecute = false;
islem.Start();
string output = islem.StandardOutput.ReadToEnd();
islem.WaitForExit();
textBox1.Text += output;
islem.Close();
Reply
Answers (
4
)
How to convert time to datetime
Help me fix and make a progressbar recieve in client recieve