HI ,

I need to Display all the Sub folders in a Shared folder which is on other
system in local network using ASP server side code.

I am using this code
'***************************************************
dim fso
dim ldir
dim lfrds
dim strList

set fso = Server.CreateObject("Scripting.FileSystemObject")

set ldir= fso.GetFolder("\\gis-srv-odtx\!Corrections")

set lfrds =ldir.subfolders

For Each folder in lfrds
Response.write folder.name
Next

Set files = Nothing
Set subFolders = Nothing
Set ldir= Nothing
Set fso = Nothing

'******************************************************

The above code works if it is a folder on local system i.e
C:\inetpub\wwroot\XYZ..
but not with shared folder .

I also tried mapping the Shared folder ..but still It doesn't work

Thanks
VENU

RE: ASP code on one server to read the contents of a shared folder(Rem by Dan

Dan
Thu Mar 23 07:52:22 CST 2006

Is this on the Server or on the local client.?
Check if the mapped drives are on the Server as well where you are trying to
create the object.

"Venu Yankarla" wrote:

> HI ,
>
> I need to Display all the Sub folders in a Shared folder which is on other
> system in local network using ASP server side code.
>
> I am using this code
> '***************************************************
> dim fso
> dim ldir
> dim lfrds
> dim strList
>
> set fso = Server.CreateObject("Scripting.FileSystemObject")
>
> set ldir= fso.GetFolder("\\gis-srv-odtx\!Corrections")
>
> set lfrds =ldir.subfolders
>
> For Each folder in lfrds
> Response.write folder.name
> Next
>
> Set files = Nothing
> Set subFolders = Nothing
> Set ldir= Nothing
> Set fso = Nothing
>
> '******************************************************
>
> The above code works if it is a folder on local system i.e
> C:\inetpub\wwroot\XYZ..
> but not with shared folder .
>
> I also tried mapping the Shared folder ..but still It doesn't work
>
> Thanks
> VENU

RE: ASP code on one server to read the contents of a shared folder by VenuYankarla

VenuYankarla
Thu Mar 23 11:01:40 CST 2006

It is a Server side script written in ASP.

and also I mapped the driver on server. but still that code doesn't work.

It works if path refers to local system like ( C:\testfolder) ...

VENU

"Dan" wrote:

> Is this on the Server or on the local client.?
> Check if the mapped drives are on the Server as well where you are trying to
> create the object.
>
> "Venu Yankarla" wrote:
>
> > HI ,
> >
> > I need to Display all the Sub folders in a Shared folder which is on other
> > system in local network using ASP server side code.
> >
> > I am using this code
> > '***************************************************
> > dim fso
> > dim ldir
> > dim lfrds
> > dim strList
> >
> > set fso = Server.CreateObject("Scripting.FileSystemObject")
> >
> > set ldir= fso.GetFolder("\\gis-srv-odtx\!Corrections")
> >
> > set lfrds =ldir.subfolders
> >
> > For Each folder in lfrds
> > Response.write folder.name
> > Next
> >
> > Set files = Nothing
> > Set subFolders = Nothing
> > Set ldir= Nothing
> > Set fso = Nothing
> >
> > '******************************************************
> >
> > The above code works if it is a folder on local system i.e
> > C:\inetpub\wwroot\XYZ..
> > but not with shared folder .
> >
> > I also tried mapping the Shared folder ..but still It doesn't work
> >
> > Thanks
> > VENU