?
Solved

creating upload component using ftp

Posted on 2000-01-22
4
Medium Priority
?
250 Views
Last Modified: 2010-05-02
create an component for uploading the file to an remote machine using ftp
commands?
0
Comment
Question by:srinimrs
  • 2
  • 2
4 Comments
 

Author Comment

by:srinimrs
ID: 2377008
Sir i want in an clear cut manner
so please sent the idea behind this?
0
 
LVL 14

Accepted Solution

by:
mcrider earned 150 total points
ID: 2377926
You can use the Microsoft Internet Transfer Control (MSINET.OCX) to FTP Files...

See the EXECUTE method help pages of the control for more information...


Basically it works like this:

The following will send the file "c:\autoexec.bat" to the host "caas.com".  The remote file will be called "testfile" and will be put in the  directory called "incoming":

    Inet1.URL = "ftp://caas.com" 'CHANGE caas.com TO REMOTE HOSTNAME
    Inet1.Password = "noneofyourbusiness" 'Password to logon to remote
    Inet1.UserName = "mcrider" 'UserID to logon remote
    Inet1.Execute , "CD incoming" 'Change remote dir to incoming
'WAIT UNTIL WE'RE FINISHED EXECUTING THE CD COMMAND.
        Do
          DoEvents
        Loop Until Not Inet1.StillExecuting
    Inet1.Execute , "SEND c:/autoexec.bat testfile"
'WAIT UNTIL WE'RE FINISHED EXECUTING THE SENDCOMMAND.
        Do
          DoEvents
        Loop Until Not Inet1.StillExecuting Inet1.Execute , "CLOSE"


To add this control to your program, right-click on the toolbox (the window with the TextBox, PictureBox, ListBox, etc.) and select "Components..." then select "Microsoft Internet Transfer Control" from the list.


Hope this helps...



Cheers!
0
 

Author Comment

by:srinimrs
ID: 2378789
sir mcirder
please in briefly how ftp works
i want an clear idea about this.
please send to the mail-id
srini_mkr@hotmail.com
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2378917
FTP is a protocol for transferring files from one system to another. It is a client/server protocol and is operating system independent.  This means you can FTP a file from a Windows environment to a UNIX environment.

An FTP server is run on a system and it waits for clients to connect to it.

The Microsoft Internet Transfer Control operates as a client.  You set the properties of this control for connecting to an FTP server (.URL, .UserName, and .Password) and then execute FTP commands using the .Execute method.

See the help pages on this control for more information...

Hope this helps.  Thanks for the points!


Cheers!
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

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

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 …
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

601 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