0

Hello,

I am trying to read the contents of a text file from a website. I am running Visual Basic 6 (SP6). I need to add this code to an existing application written in VB6, so VB.NET is out.

The file I want to read is on our website. It is a text file containing a filename. I need to get this file name so that I can download it. So help with both steps would be nice.

Thanks for your time,

Doug

2
Contributors
3
Replies
5
Views
8 Years
Discussion Span
Last Post by vb5prgrmr
0

Quite simple with the URLDownloadToFile API...

1. Use API to download file with file name
2. Open with Open Statement, Line Input Function, FreeFile Function, Close Statement
3. Use API to download named file
4. Continue on with rest of program

Good Luck

0

I have seen this URLDownloadToFile API. I had a little trouble with it but I'm still working with it and will probably use it to download the named file.

However, is it possible to read lines from the text file online, I mean, without downloading it. Read the filename in the text file directly from the website.

Thanks again!

Doug

Quite simple with the URLDownloadToFile API...

1. Use API to download file with file name
2. Open with Open Statement, Line Input Function, FreeFile Function, Close Statement
3. Use API to download named file
4. Continue on with rest of program

Good Luck

0

Nope, not as far as I know. You could also use the webbrowser control and read the file that way but once again it is "downloaded".

Good Luck

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.