[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

FTP and VB

Posted on 1998-11-11
9
Medium Priority
?
305 Views
Last Modified: 2013-11-13
I'm using the inet control in VB 6 and want to connect and download a simple text file.

The problem is that when i download the file it's in binary mode not in text mode.  I could reproduce the same in FTP when i set the mode to binary and then transfert manually the file, if i want it in ascii i have to type "type ascii" in the FTP window, i've try that in the inet control but it does'nt work it freeze the command line instead, anybody know how....
0
Comment
Question by:dabellei
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 1

Expert Comment

by:MAVERICK
ID: 1444375
My Friend made a FTP client using VB..... We had alot of trouble getting things to work with the Inet control.... much better to use Winsock

Jon

0
 
LVL 1

Expert Comment

by:dwalex
ID: 1444376
I also did an FTP client in VB some time ago. I had no trouble using an FTP client DLL I found, probably at Shareware.com. One reference I can find is this one:

H&S Technology, Inc.
P.O. Box 5152
Katy, TX  77491-5152
Tel: (281) 395-0345
Email: 70531.1066@compuserve.com
URL: http://www.hnstech.com

but I don't think they're the best alternative, because they cost. The one I chose was FREE, and came from a guy in France. Saved a client $100,000 with that technology. Search for the one from France.
0
 
LVL 2

Author Comment

by:dabellei
ID: 1444377
Sorry can't acept your answer it's not really an answer...
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 3

Expert Comment

by:HATCHET
ID: 1444378
Inet1.URL = "http://w3.one.net/~kevinw/index.html"
Text1.Text = Inet1.OpenURL

Those two lines are all you need to download TEXT.
The above two lines assumes you have a Microsoft Internet Transfer Control on the same form as the code is being called from and that it's named "Inet1".  It also assumes you have a standard TextBox Control called "Text1" on the same form as the code is being called from.  You can substitute the Text1.Text with a String variable if you like and then do with the data whatever you please.

HATCHET
0
 
LVL 2

Author Comment

by:dabellei
ID: 1444379
i've try that it does'nt work
0
 
LVL 3

Expert Comment

by:HATCHET
ID: 1444380
I tested it in a new project.  What do you mean it doesn't work?!  What version of VB are you using?  What OS you have?

HATCHET
0
 
LVL 1

Accepted Solution

by:
soeding earned 300 total points
ID: 1444381
HATCHET:

Dim txt As String
Dim b() As Byte
Dim t As Integer

b() = Inet1.OpenURL("http://myURL", 1)

For t = 0 To UBound(b) - 1
    txt = txt + Chr(b(t))
Next

RichTextBox1.Text = txt

0
 
LVL 1

Expert Comment

by:soeding
ID: 1444382
(answer was addressed to daballei ;-)
0
 
LVL 3

Expert Comment

by:HATCHET
ID: 1444383
=]
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

656 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