[Rockband]
Can any hekp with this.
I am trying to creat a directory list, which will list all files containe in a specific directory, using VBScript. The problem is when I run the page nothing happens, it remains blank. The code is below:
***********************************************************
<%@LANGUAGE="VBSCRIPT"%>
<%
Option Explicit
Dim strDocsPath, strDocsPhysicalPath
Dim objFSO, objFolder, objFiles, objFile
Dim strName, strFile, strType, lngSize
strDocsPath = "\\George\UserHome\Common\Q & A"
strDocsPhysicalPath = Server.MapPath(strDocsPath)
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(strDocsPhysicalPath)
%>
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 3</title>
</head>
<body>
<%
Set objFiles = objFolder.Files
For Each objFile in objFiles
strName = objFile.Name
strFile = LCase(strName)
strType = objFile.Type
strName = MakeTitle(strName)
lngSize = objFile.Size\1024
Response.Write "<li><a href=""" & strDocsPath & "\" & strFile & """>" & strName & "</a><br>"
Response.Write "<em>(" & lngSize & "KB" & strType & ")</em></li>" & vbCrLf
Next
Function MakeTitle(strTemp)
If InStrRev(strTemp,".") Then
strTemp = Left(strTemp,InStrRev(strTemp,".")-1)
End If
MakeTitle = strTemp
End Function
%>
</body>
</html>
********************************************************
Can anyone provide help with this.
What I am trying to achieve is to create a Windows style explorer for an Intranet, basically to view documents in a specific directory across a network. Any ideas?
Cheers in advance.
AndyLord
Can any hekp with this.
I am trying to creat a directory list, which will list all files containe in a specific directory, using VBScript. The problem is when I run the page nothing happens, it remains blank. The code is below:
***********************************************************
<%@LANGUAGE="VBSCRIPT"%>
<%
Option Explicit
Dim strDocsPath, strDocsPhysicalPath
Dim objFSO, objFolder, objFiles, objFile
Dim strName, strFile, strType, lngSize
strDocsPath = "\\George\UserHome\Common\Q & A"
strDocsPhysicalPath = Server.MapPath(strDocsPath)
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(strDocsPhysicalPath)
%>
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 3</title>
</head>
<body>
<%
Set objFiles = objFolder.Files
For Each objFile in objFiles
strName = objFile.Name
strFile = LCase(strName)
strType = objFile.Type
strName = MakeTitle(strName)
lngSize = objFile.Size\1024
Response.Write "<li><a href=""" & strDocsPath & "\" & strFile & """>" & strName & "</a><br>"
Response.Write "<em>(" & lngSize & "KB" & strType & ")</em></li>" & vbCrLf
Next
Function MakeTitle(strTemp)
If InStrRev(strTemp,".") Then
strTemp = Left(strTemp,InStrRev(strTemp,".")-1)
End If
MakeTitle = strTemp
End Function
%>
</body>
</html>
********************************************************
Can anyone provide help with this.
What I am trying to achieve is to create a Windows style explorer for an Intranet, basically to view documents in a specific directory across a network. Any ideas?
Cheers in advance.
AndyLord