|
 |
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
|
 |
|
|
 |

December 21st, 2004, 03:39 AM
|
Registered User
|
|
Join Date: Dec 2004
Location: alor setar, kedah, Malaysia.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
view server folder problem?
hi, all member ....
i have 2 server.......
first server is 192.168.0.10
second server is 192.168.0.57
my code inside first server..
but i want access all share folder in second server......
so, how a step i must do to fully access folder....
after run code like below, "path no found" error message display???
my code have any problem?
<%
Dim fso
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Dim rootFolder
Set rootFolder = fso.GetFolder("\\192.168.0.57")
Dim subFolders
Set subFolders = rootFolder.SubFolders
For Each folder in subFolders
response.write "<form action='showfolder.asp' method='post'>"
Response.Write folder.Name
Response.write "</form>"
Next
Set subFolders = Nothing
Set rootFolder = Nothing
Set fso = Nothing
%>
|

December 21st, 2004, 08:07 AM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
|
|
AFAIK, you cannot do that for a remote system using FileSystemObject. Try with WMI and VB script.
Cheers!
_________________________
- Vijay G
Strive for Perfection
|

December 21st, 2004, 09:33 AM
|
Authorized User
|
|
Join Date: Dec 2004
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Your code will work on an Intranet, but your share name is has to be specified as \\server\share. This code allowed me to view subfolders on another computer on my network:
<%@ Language = VBScript %>
<%
'Begin buffering the HTML
'Note this MUST happen before the initial HTML tag.
Response.Buffer = True
Dim fso
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Dim rootFolder
Set rootFolder = fso.GetFolder("\\192.168.1.100\MICRONC")
Dim subFolders
Set subFolders = rootFolder.SubFolders
For Each folder in subFolders
'Response.write "<form action='showfolder.asp' method='post'>"
'Response.write "</form>"
Response.Write folder.Name & "<br>"
Next
Response.End
Set subFolders = Nothing
Set rootFolder = Nothing
Set fso = Nothing
%>
Dude
|

December 21st, 2004, 11:45 AM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
|
|
But see to that the IUSR_MACHINENAME account has relavant permission on the remote folder. But I would suggest this not a reliable solution, if you are using ASP. A VBScript (.vbs) could work for you.
_________________________
- Vijay G
Strive for Perfection
|

December 21st, 2004, 10:08 PM
|
Registered User
|
|
Join Date: Dec 2004
Location: alor setar, kedah, Malaysia.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
happygv, thank your suggestion..
but i just a beginning programmer....
i dun know have to use .vbs and also don't know what is wmi....
can u teach me step by step...
thank.....
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |