473,563 Members | 2,667 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FTP Command List by command prompt in asp.net 1.1 c# code

4 New Member
Any help what is wrong with this code..
I am tring to FTP post a file by command prompt but it not work, system hang up.. commands are in my batch file...

System.Diagnost ics.ProcessStar tInfo psi = new System.Diagnost ics.ProcessStar tInfo("cmd.exe" );
psi.UseShellExe cute = false;
psi.RedirectSta ndardOutput = true;
psi.RedirectSta ndardInput = true;
psi.RedirectSta ndardError = true;
psi.Arguments = "ftp -b Upload.bat gateway.wamnet. com";

System.Diagnost ics.Process proc = System.Diagnost ics.Process.Sta rt(psi);


System.IO.Strea mWriter sIn = proc.StandardIn put; // Attach the in for writing
System.IO.Strea mReader sOut = proc.StandardOu tput; // Attach the output for reading
System.IO.Strea mReader sErr = proc.StandardEr ror; // Attach the output for errors

proc.Close();

string results = "";
results = "<br /><b>Output : </b><br />"+sOut.ReadToE nd().Trim();
results = "<br /><b>Error : </b><br />"+sErr.ReadLin e().ToString();

// Close the io Streams;
sIn.Close();
sOut.Close();
sErr.Close();
Response.Write( results);
Oct 25 '07 #1
0 1307

Sign in to post your reply or Sign up for a free account.

Similar topics

2
7825
by: Pascal Deparis | last post by:
Hi, I've got a problem with the DB2 Command Line Processor, in V8, FP1. The databases have been created on an AIX server (version 4.3.3). Have a look at this: >db2 ? list DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL1024N A...
3
2041
by: John Smith | last post by:
Hello all: I have yet another question to ask the gurus of C#. I am trying to get a list of all the connected computers on our domain. The only way I know how is by going to the command prompt and typing net view. Is there a way to use this list in a program? Is there a better way to accomplish this task? Thanks,
4
2517
by: glenn | last post by:
I keep reading all sorts of books on VS that keep telling me to click on Tools/Visual Studio Command prompt to run this program or that program. However, I do not have such a menu choice. Where is this menu? thanks, glenn
34
6827
by: Roman Mashak | last post by:
Hello, All! I'm implementing simple CLI (flat model, no tree-style menu etc.). Command line looks like this: <command> <param1> <param2> ... <paramN> (where N=1..4) And idea is pretty simple: 1) get whole string of input line 2) preset table of strings matching <command> 3) preset table of function calls
9
2248
by: RajW | last post by:
Disclaimer: I'm new to C. I'm building a simple text based program and I'm not sure I'm designing it correctly. What I have is simple and it works but it just seems weird. Is there a better way? I do still have some debugging code in the subroutine to print out the key pressed. Basically menuinput() waits for the key press, and passes it...
3
2261
by: Steven | last post by:
I am using VC++ 6.0 to build a windows based application, however, my application allows user to input command arguments in the dos prompt windows. I want to have a warning message for user if they have input the wrong arguments. How can I write text to the dos prompt windows if user input the wrong arguments? Thanks in advance. Steven.
4
4679
by: Ronald S. Cook | last post by:
Currently (manually), I 1) open a Windows SDK Command Prompt and 2) navigate to a particular folder. Then I 3) type a command and press enter. The command is irrelevant (WCF-related) but here it is FYI: svcutil http://localhost/COWFeedyardService/Services/Pen.svc /out:Pen.vb /config:App.config /language:VB All works fine, but I need to...
3
5099
by: kimiraikkonen | last post by:
Hi experts, I just want to ask a simple procedure of my simple form. My form has a input textbox and a button. I want this if you can help me: Application user types a command prompt command like "dir" into "textbox", then after clicking "button", command prompt(cmd) should run with the prompt that user has written already into "textbox"...
5
1838
by: waltbrad | last post by:
Hi folks. I'm learning Python from the Mark Lutz Book, Programming Python 3rd edition. He seems to be able to invoke the Python interpreter from any command line prompt. C:\temp>python C:\PP3rdEd\examples>python
4
2524
by: bkamrani | last post by:
Hi, This is a basic problem, but I want to print help content in a Command Prompt in WinXP and scrolling back to see the first lines. If I start a command prompt and run python, and then for example, it starts showing the help, which can be controlled by page or raw using Spacebar or Enter but after this ends, it seems that I can't...
0
7659
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7580
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7882
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8103
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7634
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6244
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3618
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1194
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.