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

Reading Contents of a directory over a network

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have this script to read the contents of a directory it works fine on the local c:\ drive however if I try to use it to read a directory on the network it says:

Microsoft VBScript runtime error '800a004c'

Path not found

/folder.asp, line 14


Here is the script :
<%
mypath=&quot;F:\C_Grant&quot;


Set filesystem = CreateObject(&quot;Scripting.FileSystemObject&quot;)
Set folder = filesystem.GetFolder(mypath)

Set filecollection = folder.subfolders
%>
<SELECT size=20 id=select1 name=Folders>
<%


For Each subfolders in filecollection
response.write &quot;<Option Value =&quot; & mypath &&quot;\&quot;& subFolders.name&&quot; >&quot; & subfolders.name & &quot;</Option>&quot;
Next
%>
</SELECT>

<%
set filesystem=nothing
set folder=nothing
set filecollection=nothing
%>


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top