---
title: "Byta ikoner till filhanterare - WebExplorer"
type: "forum-thread"
url: "https://www.webforum.nu/amne/asp/65602-byta-ikoner-till-filhanterare-webexplorer"
topic: "ASP"
topic_url: "https://www.webforum.nu/amne/asp"
author: "JPS"
published: "2003-01-20T23:06:41.000Z"
updated: "2003-01-20T23:06:41.000Z"
replies: 0
views: 187
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/asp/65602-byta-ikoner-till-filhanterare-webexplorer"
---

# Byta ikoner till filhanterare - WebExplorer

## #1 — JPS, 2003-01-20T23:06Z

Jag sitter och testar filhanteraren WebExplorer och jag vill byta ut ikoner till dokument men jag får inte koden att fungera. Jag vill ha samma kod som i ArgoBrowse

```
for each BrowsedFile in BrowseContents.Files
	FileExtBegPos = InStrRev(BrowsedFile.Name, ".")
	FileExtTotal = len(BrowsedFile.Name)
	FileExt = Right(BrowsedFile.Name, FileExtTotal - FileExtBegPos)
	
	select case FileExt
	case "asp"
	FileIcon = "aspicon.gif"
	case "htm", "html", "shtm", "shtml"
	FileIcon = "htmlicon.gif"
	case "jpg", "jpeg", "gif", "png", "bmp"
	FileIcon = "imgicon.gif"
	case "zip", "rar", "tar", "gz"
	FileIcon = "zipicon.gif"
	case "exe"
	FileIcon = "exeicon.gif"
	case "mp3", "wav", "rm", "wmv"
	FileIcon = "mp3icon.gif"
	case else
	FileIcon = "icon.gif"
	end select
```

 

Jag kan få ut filändelsen men sen är det stopp!

```
<%
		For each item in objFolder.files
			If showHiddenItems or not item.Attributes and 2 Then
				listed = listed + 1
%>

	<%
	dim a,n
	a= item.name
	a = split(a,".")
	n = a(ubound(a))
	%>
N	<% = n %>

	
<%	select case n

	case "doc"
	FileIcon = "Icon_Prog_Word.gif"
	case "xls"
	FileIcon = "Icon_Prog_Excel.gif"
	case "pdf"
	FileIcon = "Icon_Prog_Acrobat.gif"
	case htm, html, shtm, shtml
	FileIcon = "Icon_Prog_htm.gif"
	case "jpg", "jpeg", "png", "bmp"
	FileIcon = "Icon_Prog_Jpg.gif"
	case "gif"
	FileIcon = "Icon_Prog_Gif.gif"	

	case else
	FileIcon = "icon.gif"
	end select
%>
	<img src="images/<% = FileIcon%>">
	

	<tr>
		<td class="list01">&nbsp;<img src="Images/Icon_Prog_Gif.gif"><%=GetIcon(item.Name, false)%>&nbsp;<a href="<%=scriptName & "?precommand=Download&folder=" & Server.URLEncode(folder) & "&file=" & Server.URLEncode(item.Name)%>" title="Ladda ner fil"><%=item.Name%></a></td>
		<td class="list01" align="right">&nbsp;<%=FormatSize(item.Size)%></td>
		<td class="list01">&nbsp;<%=item.Type%></td>
<td  class="list01" nowrap><%= FormatDateTime(item.DateLastModified, 2)%> &nbsp;<%= FormatDateTime(item.DateLastModified, 4)%></td>
		<td  class="list01" nowrap>
			
			<a href="javascript:Command('RenameFile', &#34;<%=item.Name%>&#34;);"><img src="images/Andra.gif" alt=" Byt namn " width="13" height="12" border="0"></a>
			<a href="javascript:Command('DeleteFile', &#34;<%=item.Name%>&#34;);"><img src="images/Ta_bort.gif" alt=" Ta bort fil " width="13" height="12" border="0"></a>
		</td>
	</tr>
<%
				'If rowType = "darkRow" Then rowType = "lightRow" Else rowType = "darkRow"
			End If	
		Next
	End If
%>
</table>
```

Permalänk: https://www.webforum.nu/p/65602

---

Tråden på webben: https://www.webforum.nu/amne/asp/65602-byta-ikoner-till-filhanterare-webexplorer
