WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

FTP Functions

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

FtpQuote is returning Error 500

Keywords:   FTPQuote 500 

Special note on the 500 Error:

There is not a list of the error messages that correspond to the 500 FTP Winsock error because the informative messages for this error are passed by the server itself, rather than by the Winsock extender functions. Therefore, the exact syntax of the error message depends on the configuration of the server.

Question:

I am attempting to do a ftpQuote from a Windows 95 machine to a Unix ftp server. Here is my command
rslt=ftpQuote(ftphandle,"MV /excdev/data/RP/Petroin /excdev/data/RP/Petindone")

FtpQuote command returns and error " 500 'MV /excdev/data/RP/Petroin /excdev/data/RP/Petindone':command not understood."

Answer:

Note: The "MV" (Move) command is a UNIX specific command. Our ftpQuote command is designed to send a command string to a remote FTP server. Your server will need to be configured to execute "MV" command remotely.
First, you might try adding the command "SITE" to your command string.

rslt=ftpQuote(ftphandle,"SITE MV /excdev/data/RP/Petroin /excdev/data/RP/Petindone")

If that doesn't work you might try to using this command in an ftp session outside of WinBatch:

For example in Windows 95 you can run c:\windows\ftp.exe

-At the command line type

open ftp.domain.com
SITE MV /excdev/data/RP/Petroin /excdev/data/RP/Petindone 

If it returns "?InvalidCommand", then you will not be able to execute this command in winbatch either.

Question:

I am attempting to do a ftpQuote from a Windows 95 machine to a Unix ftp server. Here is my command to recieve list of files..NOTICE my command string is lower case.....
rslt=ftpQuote(ftphandle,"ls")

NOTICE the Error Return string is UPPER case.....
FtpQuote command returns and error " 500 'LS':command not understood." Why is this???

Answer:

The messages for this error are passed by the server itself...The winbatch error message 500 just uses the error string returned from the ftp server. Try the following to see if you get the same result..
1.	launch..."c:\windows\ftp.exe"
2.	type...Open ftp.name.com 
3.	type(user id)...guest 
4.	type(user pswd)...guest 
5. 	type... quote 
6.	type(command string)...ls (notice lowercase)
7.      Did you get this error.....500 'LS': command not understood (notice uppercase)
If you notice the error string is returned by the server is upper-cased. Winbatch has no control over CASE. If you get an error, when you attempt this "quote" command in the windows utility, then Winbatch will not be able to procees the request either...

Here's some background on how FtpQuote works:

The actual server commands are NOT the commands you type into your FTP Client.

For example in your client you often type PUT or STOR. FTP servers do not recognise those commands, but rather a STOR command that the ftp client sends to the server.

LS is similisr. The command actually sent is LIST.

The ftpList function already does this.


Article ID:   W12641
Filename:   500 Error on ftpQuote.txt
File Created: 1999:04:15:16:48:36
Last Updated: 1999:04:15:16:48:36