|
-
Sep 14th, 2004, 02:13 PM
#1
Thread Starter
Hyperactive Member
FileSystemObject and UNC
Is it possible to get the names of files in a folder using the FSO and a UNC within an ASP?
e.g.
Set objFileSys = Server.CreateObject("Scripting.FileSystemObject")
Set Fldrs = objFileSys.GetFolder("\\fileserver\temp\")
and then loop through the file names there.
The files there are all VBScripts (.vbs) and I want to dynamically build up a page of hypertext links to those so that simply adding a new .vbs file will let it show up on the links page.
Thanks, DaveBo
Last edited by DaveBo; Sep 15th, 2004 at 07:56 AM.
"The wise man doesn't know all the answers, but he knows where to find them."
VBForums is one place, but for the really important stuff ... here's a clue 1Tim3:15
-
Sep 14th, 2004, 09:10 PM
#2
You should use
Response.write Server.MapPath("FileOrFolderName")
That will give you the full physical path of the file/folder.
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Sep 15th, 2004, 07:55 AM
#3
Thread Starter
Hyperactive Member
I'm trying to get a list of the files in a folder at a UNC path.
When I tried using a UNC in the Server.MapPath I got the following error msg:
Server.MapPath(), ASP 0174 (0x80004005)
An invalid '/' or '\' was found in the Path parameter for the MapPath method.
"The wise man doesn't know all the answers, but he knows where to find them."
VBForums is one place, but for the really important stuff ... here's a clue 1Tim3:15
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|