Solved

FTPCommand - command not understood

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Replace a tag with sed 2 43
countHi challenge 25 85
array6 challenfge 6 65
topping2 challenge 13 62
RIA (Rich Internet Application) tools are interactive internet applications which have many of the characteristics of desktop applications. The RIA tools typically deliver output either by the way of a site-specific browser or via browser plug-in. T…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now