Discussion Locked

Accessing Files Across Web with VB

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Here's what I'm trying to do. I've got files that are being generated to a folder on a server out there on the internet somewhere. And I then Have a VB App access them. The problem is that it needs to be somewhat secure. I can't just put them in a virtual directory exposing them for the entire web.
What I'd like to do is set up a web share on the server, and then run something similar to this:
cFolder = "\\192.168.0.10\webshare\"
cValidate = DIR$(cFolder,vbnormal)
But when I run this (using a real IP address on the web with a webshare) I get a runtime error #52 Bad file name or number.
What I'm really looking for is a way to map a network drive across the internet. Is that possible?

7 replies

by mark_t

If the folder(s) the files were being generated to was an FTP site, which should be easy provided you have control over the server which the files reside. You can then use something like the Mabry FTP control in your VB app, you'll be able to retrieve the file(s)

by rrv

If you have the server name or IP, a valid user id and valid password it is possible as you are using VB6. You get a sample VB program for samples of APIs [ftpgetfile/ftpputfile]. It works fine and much faster for any size files provided authentication is given.
RV

This discussion is closed to new replies.