Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can I use the windows ftp utility in my vb app?

Status
Not open for further replies.

yongbum

Programmer
Dec 15, 2005
48
IL
I've been lookig for a tutorial for using ftp in a visual basic app. for simple PUT and GET.
I found lots of tutorials for Winsoc and Wininet and examples apps with ftp classes and modules.
Then I discovered most Windows systems have ftp built in and in a 4 line script can login to the ftp server, PUT/GET a file and logoff, but I couldn't find any tutorials or info how I could include this built in ftp in my VB app.
Can someone let me know how to use this ftp in a vb app
 
You may find this thread useful: thread708-970319

HTH

Bob
 
Thanks I checked out your thread. This is what I did

I wrote the following batch file:

echo open 192.168.102.xxx > supftp.txt
echo super >> supftp.txt
echo enosh >> supftp.txt
echo prompt >> supftp.txt
echo mdelete * >> supftp.txt
echo ascii >> supftp.txt
echo put %1 >> supftp.txt
echo put c:\prt\mifalid.dat >> supftp.txt
echo bye >> supftp.txt
0d_0a_1a supftp.txt
%windir%\ftp -s:supftp.txt

which i use in my vb app:

retval = Shell("c:\prt\supftp.bat " & strRemote, 0)

seems to work ok - no messing around with ftp classes and modules, just input the actual commands to the ftp.exe utility installed on most window systems.
Hope this is of use to someone.
 
Very good. I saw your post to the other thread as well. Looks like a simple solution.

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top