473,569 Members | 2,634 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need help with ftp commands???

I am not to familiar with ftp, but in the code I do the following, and it
does not work...

ff.setGetCamera ("cameras.tar.g z");

sendCommand("GE T "+remFileNa me);
if (retValue != 200)
{
//throw new IOException(rep ly.Substring(4) );
}
}

private void sendCommand(Str ing command)
{

Byte[] cmdBytes =
Encoding.ASCII. GetBytes((comma nd+"\r\n").ToCh arArray());
clientSocket.Se nd(cmdBytes, cmdBytes.Length , 0);
readReply();
}
Nov 15 '05 #1
8 3650
Dave,

When you send a GET command to an FTP server, a secondary connection is
opened to do the actual transferring of the file. The response you get from
the GET command should tell you where you can connect (host and port) in
order to get the file. If you are using passive connections, then the
response to your command would indicate that the connection has been
estabilished to you.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"DaveF" <df*****@geodec isions.com> wrote in message
news:e9******** ******@TK2MSFTN GP12.phx.gbl...
I am not to familiar with ftp, but in the code I do the following, and it
does not work...

ff.setGetCamera ("cameras.tar.g z");

sendCommand("GE T "+remFileNa me);
if (retValue != 200)
{
//throw new IOException(rep ly.Substring(4) );
}
}

private void sendCommand(Str ing command)
{

Byte[] cmdBytes =
Encoding.ASCII. GetBytes((comma nd+"\r\n").ToCh arArray());
clientSocket.Se nd(cmdBytes, cmdBytes.Length , 0);
readReply();
}

Nov 15 '05 #2
You just went over my head?

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in
message news:OR******** *****@TK2MSFTNG P09.phx.gbl...
Dave,

When you send a GET command to an FTP server, a secondary connection is opened to do the actual transferring of the file. The response you get from the GET command should tell you where you can connect (host and port) in
order to get the file. If you are using passive connections, then the
response to your command would indicate that the connection has been
estabilished to you.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"DaveF" <df*****@geodec isions.com> wrote in message
news:e9******** ******@TK2MSFTN GP12.phx.gbl...
I am not to familiar with ftp, but in the code I do the following, and it does not work...

ff.setGetCamera ("cameras.tar.g z");

sendCommand("GE T "+remFileNa me);
if (retValue != 200)
{
//throw new IOException(rep ly.Substring(4) );
}
}

private void sendCommand(Str ing command)
{

Byte[] cmdBytes =
Encoding.ASCII. GetBytes((comma nd+"\r\n").ToCh arArray());
clientSocket.Se nd(cmdBytes, cmdBytes.Length , 0);
readReply();
}


Nov 15 '05 #3
"DaveF" <df*****@geodec isions.com> wrote in news:e9EDyceAEH A.1548
@TK2MSFTNGP12.p hx.gbl:
I am not to familiar with ftp, but in the code I do the following, and it
does not work...


FTP requires TWO connections and is not a trivial protocol to implement. If
you really want to write your own using a raw TCP socket you have a LOT of
work ahead of you.

You might consider Indy, its free and has the most comprehensive FTP support
available. Its also free.

www.indyproject.org
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programmin g is an art form that fights back"
Nov 15 '05 #4
I tried INDY site, but couldn't find a single C# FTP example for any upload,
download. While it is certainly perhaps the richest (120 TCP/IP protocols)
library, the lack of practical C# usage example for FTP is the biggest
obstacle in its wide spread acceptance in .NET community.

Fakher Halim

"Chad Z. Hower aka Kudzu" <cp**@hower.org > wrote in message
news:Xn******** *********@127.0 .0.1...
"DaveF" <df*****@geodec isions.com> wrote in news:e9EDyceAEH A.1548
@TK2MSFTNGP12.p hx.gbl:
I am not to familiar with ftp, but in the code I do the following, and it does not work...
FTP requires TWO connections and is not a trivial protocol to implement.

If you really want to write your own using a raw TCP socket you have a LOT of
work ahead of you.

You might consider Indy, its free and has the most comprehensive FTP support available. Its also free.

www.indyproject.org
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programmin g is an art form that fights back"

Nov 16 '05 #5
I tried INDY site, but couldn't find a single C# FTP example for any upload,
download. While it is certainly perhaps the richest (120 TCP/IP protocols)
library, the lack of practical C# usage example for FTP is the biggest
obstacle in its wide spread acceptance in .NET community.

Fakher Halim

"Chad Z. Hower aka Kudzu" <cp**@hower.org > wrote in message
news:Xn******** *********@127.0 .0.1...
"DaveF" <df*****@geodec isions.com> wrote in news:e9EDyceAEH A.1548
@TK2MSFTNGP12.p hx.gbl:
I am not to familiar with ftp, but in the code I do the following, and it does not work...
FTP requires TWO connections and is not a trivial protocol to implement.

If you really want to write your own using a raw TCP socket you have a LOT of
work ahead of you.

You might consider Indy, its free and has the most comprehensive FTP support available. Its also free.

www.indyproject.org
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programmin g is an art form that fights back"

Nov 16 '05 #6
I tried INDY site, but couldn't find a single C# FTP example for any upload,
download. While it is certainly perhaps the richest (120 TCP/IP protocols)
library, the lack of practical C# usage example for FTP is the biggest
obstacle in its wide spread acceptance in .NET community.

Fakher Halim

"Chad Z. Hower aka Kudzu" <cp**@hower.org > wrote in message
news:Xn******** *********@127.0 .0.1...
"DaveF" <df*****@geodec isions.com> wrote in news:e9EDyceAEH A.1548
@TK2MSFTNGP12.p hx.gbl:
I am not to familiar with ftp, but in the code I do the following, and it does not work...
FTP requires TWO connections and is not a trivial protocol to implement.

If you really want to write your own using a raw TCP socket you have a LOT of
work ahead of you.

You might consider Indy, its free and has the most comprehensive FTP support available. Its also free.

www.indyproject.org
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programmin g is an art form that fights back"

Nov 16 '05 #7
I tried INDY site, but couldn't find a single C# FTP example for any upload,
download. While it is certainly perhaps the richest (120 TCP/IP protocols)
library, the lack of practical C# usage example for FTP is the biggest
obstacle in its wide spread acceptance in .NET community.

Fakher Halim

"Chad Z. Hower aka Kudzu" <cp**@hower.org > wrote in message
news:Xn******** *********@127.0 .0.1...
"DaveF" <df*****@geodec isions.com> wrote in news:e9EDyceAEH A.1548
@TK2MSFTNGP12.p hx.gbl:
I am not to familiar with ftp, but in the code I do the following, and it does not work...
FTP requires TWO connections and is not a trivial protocol to implement.

If you really want to write your own using a raw TCP socket you have a LOT of
work ahead of you.

You might consider Indy, its free and has the most comprehensive FTP support available. Its also free.

www.indyproject.org
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programmin g is an art form that fights back"

Nov 16 '05 #8
"Fakher Halim" <fa****@msn.com > wrote in
news:u8******** ******@TK2MSFTN GP10.phx.gbl:
I tried INDY site, but couldn't find a single C# FTP example for any
upload, download. While it is certainly perhaps the richest (120 TCP/IP
protocols) library, the lack of practical C# usage example for FTP is
the biggest obstacle in its wide spread acceptance in .NET community.


Open Source needs volunteers to make is successful - demos just like anything
else come from volunteers.

But you've seen that now - you've got the FTP article up on CodeProject.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programmin g is an art form that fights back"
Nov 16 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1774
by: Tim Stanka | last post by:
Thanks in advance for any responses. I have an application which embeds Python. I also have a command window for using Python interactively. The last piece I have left is to detect incomplete (ie "for x in range(10):") vs bad ("fer x in ronge(10):") input. Basically I read a line of input from my command window and feed it to...
11
8734
by: Jim | last post by:
Hi, I keep getting form results emailed to me that would indicate a form from my web site is getting submitted with all fields blank or empty, but my code should preventing users from proceeding if they left any field blank. My guess is that someone is trying to hack the site using the form to gain entry or run commands -- I don't really...
23
8916
by: da Vinci | last post by:
Greetings, Onwards with the school studying. Working on a program and need to delete a file from a known location on the hard drive but cannot get anything I do to work. I have tried to use the remove function that is included with <cstdio> but cannot get it to work properly. My reference book has the following....
6
1999
by: Martijn van Oosterhout | last post by:
I've had some fun in the past where I've had to grant a lot of tables and other similar system commands. Unfortunatly, you can't use queries to fill in fields for you. Anyway, I've implemented a patch which allows the following: grant select on ":2" to ":1" \for select usename, relname from pg_catalog.pg_user, pg_catalog.pg_class where...
25
2670
by: Bjørn T Johansen | last post by:
I need to write a SQL that calculates the interval between a start time and a stop time. This is the easy part. The problem is that I only have the time part, i.e. no date, so how can I be sure to also calculate the interval if the start time is before midnight and the stop time is after midnight? Regards, BTJ
2
1999
by: ern | last post by:
My command-line application must be able to run text scripts (macros). The scripts have commands, comments, and flags. Comments are ignored (maybe they are any line beginning with " ; ") Commands are executed as if the user *manually* typed them in the console. Flags are special commands that tell the program where to BREAK, LOOP, START. A...
13
2374
by: gavino | last post by:
This seems easy but I have been asking tcl and python IRC chat all day and no one gave an answer. I have 100 servers which need a new backup server added to a text file, and then the backup agent restarted. If I have a list of the servers, all with same root password, and the connection is ssh. How do I connect to the server, cat the line to...
0
3971
by: jeoffh | last post by:
Background: I am trying to "merge" some attributes into an existing XML column in my MS SQL 2005 database. The general idea is that I have an XML column in a table and I would like to update/delete some values while leaving the other values alone. I am designing this database/table/column so maybe I could use attributes or elements/nodes, the...
2
980
by: erbilkonuk | last post by:
Hi everyone, I have been developing a project that is composed of one windows service and one ASP.NET web site. The windows service and ASP.NET web site reside on the same server. I want to send start/stop service commands and custom commands to the Windows service from ASP.NET Web site. What I have done is : * I read in a site that an...
0
1453
by: jsimps44 | last post by:
Hi, I'm fairly new to c, and very new to piping and file descriptors and can't seem to get past this problem. The piping is very much not working, and I can't figure out for the life of me why. Any help at all would be greatly appreciated. #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/types.h>...
0
7701
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
7924
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
8130
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...
0
7979
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3643
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
940
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.