Solved

FTPCommand - command not understood

Posted on 2004-08-12
3
280 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article will show, step by step, how to integrate R code into a R Sweave document
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

839 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