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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maping Directory's on Remote Computer

Status
Not open for further replies.

shenn2

Programmer
Jun 4, 2003
7
0
0
US
Hey people this is really frustrating me. I am trying to map all the files on a remote computer in my network into a database.

I am having a problem when connecting to the remote computer though. I have tried mapping the drive and all sorts of things. let me know what you think.

The folder is shared with all access granted

Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Dim objFolder
Set objFolder = objFSO.GetFolder("\\Server\c\data")

Well any help is greatly appreciated

Thanks

Shenn
 
If you don't mind looking at it, there is a program like you want already made, it shows you, but i don't think it maps it into a DB. If you want here it is:
I have done something like that, but again not into a DB, here is what i did

path = Server.MapPath("PartImages")
set fs = CreateObject("Scripting.FileSystemObject")
set folder = fs.GetFolder(path)
for each item in folder.Files
...
RS("FolderName") = folder.Files
code for insert into DB
...
next
 
Your code works well however it does not solve my problem. Even when i used your code it would not map my network drives. I am trying to map a path that is not located on the computer i am running the website from. I am trying to map a path on a remote computer.

Anyone?

Shenn
 
the webserver must have the proper permissions to talk/connect to the remote server.

typically, the user under which the webserver runs is named IUSR_HOSTNAME (where hostname is the name of the computer). this user has no permissions whatsoever, except for doing its own web-related stuff. therefore, the webserver would not be able to connect to other resources on the network....

you can tell the webserver (or even just a single application/virtual directory on the server) to run under the permissions of a different, specific user: one that has permissions to connect to the desired remote server.

hope this helps!
-f!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top