|
 |
asp_discuss thread: Folder path!!!
Message #1 by "madan" <madan@l...> on Wed, 5 Dec 2001 10:19:19 -0800
|
|
I am trying to access a LAN drive using FileSystemObject. GetFolder
method. I want to go into a folder, do a look up of the files and then
display the contents of the folder in a browser using asp. sVariableFolder
depends on the user logged in. The code I am using is something like this,
On Error Resume Next
g_oUserFolder = "\\195.228.170.29\folder1\folder2\folder3\" &
sVariableFolder
Set g_oFso = Server.CreateObject("Scripting.FileSystemObject")
Set oFolder = g_oFso.GetFolder(g_oUserFolder)
Set colFile = oFolder.Files
For Each oFile in colFile
Set objFile = g_oFso.GetFile(oFile)
etc.
I get and error saying path not found, however according to literature you
can use a path (absolute or relative) to a specific folder.
Please help.
Madi
----- Original Message -----
From: ListManager <ListManager@p...>
To: <madan@l...>
Sent: Tuesday, December 04, 2001 8:53 PM
Subject: Re: asp_discuss
> You have been subscribed to asp_discuss with the email address
> "madan@l..."
>
> To unsubscribe, send a blank email to
$subst('Email.Unsub')
>
>
>
> Note: your member password is: "madan"
>
Message #2 by "madan" <madan@l...> on Wed, 5 Dec 2001 12:23:16 -0800
|
|
----- Original Message -----
From: madan <madan@l...>
To: ListManager <ListManager@p...>; <asp_discuss@p...>
Sent: Wednesday, December 05, 2001 10:19 AM
Subject: Folder path!!!
> I am trying to access a LAN drive using FileSystemObject. GetFolder
> method. I want to go into a folder, do a look up of the files and then
> display the contents of the folder in a browser using asp. sVariableFolder
> depends on the user logged in. The code I am using is something like this,
>
> On Error Resume Next
> g_oUserFolder = "\\195.228.170.29\folder1\folder2\folder3\" &
> sVariableFolder
>
> Set g_oFso = Server.CreateObject("Scripting.FileSystemObject")
>
> Set oFolder = g_oFso.GetFolder(g_oUserFolder)
>
> Set colFile = oFolder.Files
>
> For Each oFile in colFile
>
> Set objFile = g_oFso.GetFile(oFile)
>
> etc.
>
> I get and error saying path not found, however according to literature you
> can use a path (absolute or relative) to a specific folder.
>
> Please help.
>
> Madi
>
Message #3 by <doris@h...> on Wed, 5 Dec 2001 18:46:10 +0800
|
|
You can find the solution in Page 200 in Chapter 5 of ASP Professional 3.0
and you can download the example from their web site.
Ken & Doris
----- Original Message -----
From: "madan" <madan@l...>
To: "asp_discuss" <asp_discuss@p...>
Sent: Thursday, December 06, 2001 2:19 AM
Subject: [asp_discuss] Folder path!!!
> I am trying to access a LAN drive using FileSystemObject. GetFolder
> method. I want to go into a folder, do a look up of the files and then
> display the contents of the folder in a browser using asp. sVariableFolder
> depends on the user logged in. The code I am using is something like this,
>
> On Error Resume Next
> g_oUserFolder = "\\195.228.170.29\folder1\folder2\folder3\" &
> sVariableFolder
>
> Set g_oFso = Server.CreateObject("Scripting.FileSystemObject")
>
> Set oFolder = g_oFso.GetFolder(g_oUserFolder)
>
> Set colFile = oFolder.Files
>
> For Each oFile in colFile
>
> Set objFile = g_oFso.GetFile(oFile)
>
> etc.
>
> I get and error saying path not found, however according to literature you
> can use a path (absolute or relative) to a specific folder.
>
> Please help.
>
> Madi
>
> ----- Original Message -----
> From: ListManager <ListManager@p...>
> To: <madan@l...>
> Sent: Tuesday, December 04, 2001 8:53 PM
> Subject: Re: asp_discuss
>
>
> > You have been subscribed to asp_discuss with the email address
> > "madan@l..."
> >
> > To unsubscribe, send a blank email to
> $subst('Email.Unsub')
> >
> >
> >
> > Note: your member password is: "madan"
> >
>
>
$subst('Email.Unsub')
>
>
|
|
 |