Solved

FtpPutFile

Posted on 2006-07-18
2
1,904 Views
Last Modified: 2012-06-27
FtpPutFile(hConnection, x, y, FTP_TRANSFER_TYPE_BINARY, 0)

I dont understand what "x" is supose to represent.  I have read up on it and still can not grasp it.  A killed string that refers to the document to be uploaded?

does someone have an example?  how should i save "x" and declare x?

Thanks  
0
Comment
Question by:aboskoco
2 Comments
 

Assisted Solution

by:priya_rifluxyss
priya_rifluxyss earned 300 total points
ID: 17136274

try this code
dim szFileLocal as string
dim szFileRemote as string
dim dwtype as long
dim bret as boolean
 bRet = FtpPutFile(hConnection, szFileLocal, szFileRemote, dwType, 0)

set the path of local file to "szFileLocal"
set the path of remote file to "szFileRemote"

example
szFileLocal="C:\xx.txt"
szFileRemote="/www/xxx/xx.txt"

This will work
0
 
LVL 29

Accepted Solution

by:
nffvrxqgrcfqvvc earned 200 total points
ID: 17136838
lpszLocalFile
[in] Pointer to a null-terminated string that contains the name of the file to be sent from the local system.

This parameter is were you specify the complete location of the file your going to upload to your FTP server, as shown in the example above by priya_rifluxyss.
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

830 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