04. juni 2003 - 14:31Der er
4 kommentarer og 1 løsning
FSO på windows server
Jeg benytter denne på en af mine asp-sider rootpath = "\\filessrv\Fileshare" Det virker fint på en Unixserver Jeg vil gerne genbruge den på en W2K server .. eks.: rootpath = "\\citrixfs\Fileshare" men der får jeg "Path not found" - fejl
<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1"> <tr> <td> <% rootpath = "citrixfs/Fileshare" level = 0 rem Response.Write "<h6>Placering: " & rootpath & "</h6><br>" %> <!--<h6><INPUT TYPE="checkbox" NAME="targetnew" ONCLICK="hyperlinks(this.checked)" value="ON">Kryds dette felt af, for at få vist PDF i et nyt vindue</h6>--> </td> </tr> <tr> <td valign="top"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber1"> <% sub getPath(strPath,level) Set fsObj = CreateObject("Scripting.FileSystemObject") Set MainFolder = fsObj.GetFolder(strPath) Set Files = MainFolder.Files Set Folders = MainFolder.subfolders
For Each Folder in Folders for a = 1 to level Response.Write " " next Response.write "<IMG SRC='folder.gif' align='absbottom'> <B>" & UCASE(folder.name) & "</b><br>" call getPath(strPath & "\" & lcase(folder.name),level+1) next
For Each File in Files if right(file.name, 8) = ".qxd.pdf" then strFileName = LCASE(file.name) arrFileName = Split(strFileName,".") ID = ArrFileName(LBound(arrFileName)) for a = 1 to level Response.Write " " next Response.write "<tr>" Response.write "<td><h4>" & LCASE(file.name) & "</h4></td>" Response.write "</tr>" end if next set fsObj = Nothing set MainFolder = Nothing end sub
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.