Home > Archive > Tcl > April 2007 > issue with ftp::Quote STATUS .
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
issue with ftp::Quote STATUS .
|
|
| Patrick Finnegan 2007-04-26, 7:08 pm |
|
Running Tcl 8.4.14 on Windows XP.
I am trying to use the ftp:Quote option to send native FTP commands to
an FTP server but it returns "command not understood".
Works from the ftp command line on tyhe same machines.
(bin) 65 % ftp::Pwd $session
/
(bin) 66 % ftp::Quote $session STATUS
500 'STATUS': command not understood.
Output from command line FTP.
ftp> status
Connected to 12.34.56.78..
Type: ascii; Verbose: On ; Bell: Off ; Prompting: On ; Globbing: On
Debugging: Off ; Hash mark printing: Off .
| |
| Darren New 2007-04-26, 7:08 pm |
| Patrick Finnegan wrote:
> (bin) 66 % ftp::Quote $session STATUS
> 500 'STATUS': command not understood.
Upper case?
> ftp> status
> Connected to 12.34.56.78..
> Type: ascii; Verbose: On ; Bell: Off ; Prompting: On ; Globbing: On
> Debugging: Off ; Hash mark printing: Off .
Lower case?
Just a thought...
--
Darren New / San Diego, CA, USA (PST)
His kernel fu is strong.
He studied at the Shao Linux Temple.
| |
| Mark Janssen 2007-04-26, 7:08 pm |
| On 26 Apr 2007 07:31:53 -0700, Patrick Finnegan
<finnegan.patrick@gmail.com> wrote:
>
>Running Tcl 8.4.14 on Windows XP.
>
>I am trying to use the ftp:Quote option to send native FTP commands to
>an FTP server but it returns "command not understood".
>
>Works from the ftp command line on tyhe same machines.
>
>(bin) 65 % ftp::Pwd $session
>/
>(bin) 66 % ftp::Quote $session STATUS
>500 'STATUS': command not understood.
>
>
>Output from command line FTP.
>
>ftp> status
>Connected to 12.34.56.78..
>Type: ascii; Verbose: On ; Bell: Off ; Prompting: On ; Globbing: On
>Debugging: Off ; Hash mark printing: Off .
It seems that this is not what ftp::Quote is doing ftp::Quote is
actually sending the command "quote cmd" to the server. This gives the
same result when I try it from my ftp client:
ftp> quote stat
500 'STAT' not understood
ftp> stat
Connected to ftp2.xs4all.nl.
Type: ascii; Verbose: On ; Bell: Off ; Prompting: On ; Globbing: On
Debugging: Off ; Hash mark printing: Off .
What ftp::Quote is to achieve then is not clear to me.
Mark
| |
| Douglas Wells 2007-04-26, 7:08 pm |
| In article <1177597912.942299.215730@n35g2000prd.googlegroups.com>, Patrick Finnegan <finnegan.patrick@gmail.com> writes:
> Running Tcl 8.4.14 on Windows XP.
>
> I am trying to use the ftp:Quote option to send native FTP commands to
> an FTP server but it returns "command not understood".
>
> Works from the ftp command line on tyhe same machines.
>
> (bin) 65 % ftp::Pwd $session
> /
> (bin) 66 % ftp::Quote $session STATUS
> 500 'STATUS': command not understood.
>
> Output from command line FTP.
>
> ftp> status
> Connected to 12.34.56.78..
> Type: ascii; Verbose: On ; Bell: Off ; Prompting: On ; Globbing: On
> Debugging: Off ; Hash mark printing: Off .
If you are going to use FTP commands directly, you really should
study the FTP protocol (RFC 959), otherwise you are operating in
the dark.
You will also find it instructive to ask your ftp command to show
you the actual protocol interactions as the ftp client is interpreting
the commands that your type. (I don't use Windows XP, but the
command is probably something like "debug".) In this particular
case, you will find that the ftp client is almost certainly simply
reporting to you its current state based on its local information.
There is probably *no* FTP command transmitted whatsoever (for
this particular client command).
There is an FTP 'STAT' command, but I don't know if it does what
you want as it's not clear what you are really trying to do.
Also, in response to another suggestion in this thread, the case
of the command does not matter. FTP, as most Internet protocols,
is case insensitive. (Thus, you could use STAT, stat, Stat, or
even sTaT over the wire.)
- dmw
--
.. Douglas Wells . Connection Technologies .
.. Internet: -sp9804- -at - contek.com- .
| |
| Patrick Finnegan 2007-04-27, 7:07 pm |
| On Apr 26, 11:17 pm, s...@signature.invalid (Douglas Wells) wrote:
> In article <1177597912.942299.215...@n35g2000prd.googlegroups.com>, Patrick Finnegan <finnegan.patr...@gmail.com> writes:
>
>
>
>
>
>
>
>
>
> If you are going to use FTP commands directly, you really should
> study the FTP protocol (RFC 959), otherwise you are operating in
> the dark.
>
> You will also find it instructive to ask your ftp command to show
> you the actual protocol interactions as the ftp client is interpreting
> the commands that your type. (I don't use Windows XP, but the
> command is probably something like "debug".) In this particular
> case, you will find that the ftp client is almost certainly simply
> reporting to you its current state based on its local information.
> There is probably *no* FTP command transmitted whatsoever (for
> this particular client command).
>
> There is an FTP 'STAT' command, but I don't know if it does what
> you want as it's not clear what you are really trying to do.
>
> Also, in response to another suggestion in this thread, the case
> of the command does not matter. FTP, as most Internet protocols,
> is case insensitive. (Thus, you could use STAT, stat, Stat, or
> even sTaT over the wire.)
>
> - dmw
>
> --
> . Douglas Wells . Connection Technologies .
> . Internet: -sp9804- -at - contek.com- .
Thanks for all of your replies. I got it working for some commands.
package require ftp
set ftp::VERBOSE 1
set ftp::DEBUG 1
set session [ ftp::Open $host $logon $password -output ftpOut ]
puts "\ndir list\n"
foreach i [ ::ftp::NList $session * ] {
puts $i
}
puts "\n"
###############################
puts "check pwd"
catch { ftp::Quote $session pwd } r
puts "result is $r "
##############################
puts "\n"
###############################
puts "change users"
catch { ftp::Quote $session user $logon2 $password2 } r
puts "result is $r "
###############################
puts "\ndir list\n"
foreach i [ ::ftp::NList $session * ] {
puts $i
}
puts "\n"
::ftp::Close $session
|
|
|
|
|