Solved

FTPCommand - command not understood

Posted on 2004-08-12
3
281 Views
Last Modified: 2012-06-21
I am writing a VB 6.0 app that will read commands from a file much like FTP.exe does. It will of course be using the wininet.dll. The only one I am having a problem with is the FTPCommand. Code is as follows:
Public Function SendCommand(ByVal strCommand As String) As Boolean

Dim hFile As Long

strCommand = "PUT test.txt"
If FtpCommand(hConnection, False, Me.TransferType, strCommand, 0, hFile) = False Then
ErrorOut Err.LastDllError, "SendCommand"
SendCommand = False
Exit Function
Else
SendCommand = True
End If

End Function

Where strCommand is actually read in from a file so it could be any valid FTP command.  It recognizes the "quit" command but does not allow me to perform the "PUT". Is my syntax incorrect? Please advise.
0
Comment
Question by:legna456
3 Comments
 
LVL 11

Accepted Solution

by:
lbertacco earned 50 total points
ID: 11786896
To send files, you should use FtpPutFile, not FtpCommand
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A short article about a problem I had getting the GPS LocationListener working.
A short article about problems I had with the new location API and permissions in Marshmallow
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question