---
title: "Asp+bild+filnamn?"
type: "forum-thread"
url: "https://www.webforum.nu/amne/asp/14382-asp-bild-filnamn"
topic: "ASP"
topic_url: "https://www.webforum.nu/amne/asp"
author: "bluespot"
published: "2002-02-12T19:17:00.000Z"
updated: "2002-02-12T19:52:00.000Z"
replies: 4
views: 177
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/14382-asp-bild-filnamn"
---

# Asp+bild+filnamn?

## #1 — bluespot, 2002-02-12T19:17Z

Kan jag få upp alla bilder på en asp-sida och dessutom få upp filnamnet?

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

## #2 — Jesper T, 2002-02-12T19:21Z

Skall du loopa ut något eller bara skriva ut länkarna manuellt, hur hade du tänkt? Känns som detta går att göra på flera sätt. Ge lite exempel Helge!

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

## #3 — bluespot, 2002-02-12T19:23Z

?

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

## #4 — Palleman, 2002-02-12T19:27Z

Detta script plockar fram bild och filnamn på alla GIF och JPG i samma mapp som sidan.

```
<%
     
Dim strPathInfo, strPhysicalPath
     strPathInfo = Request.ServerVariables("PATH_INFO")
     strPhysicalPath = Server.MapPath(strPathInfo)
     
Dim objFSO, objFile, objFileItem, objFolder, objFolderContents
     Set objFSO = CreateObject("Scripting.FileSystemObject")
     set objFile = objFSO.GetFile(strPhysicalPath)
     set objFolder = objFile.ParentFolder
     set objFolderContents = objFolder.Files 
     
     
     For Each objFileItem in objFolderContents
     
          If Right(objFileItem.Name, 3) = "gif" OR Right(objFileItem.Name, 3) = "jpg" Then
     
               Response.Write "<img src="& objFileItem.Name &"><br>"
               Response.Write objFileItem.Name &"<br><br><br>"
     
          End If
     
     Next
     
%>
```

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

## #5 — bluespot, 2002-02-12T19:52Z

Tack så mycket!

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

---

Tråden på webben: https://www.webforum.nu/amne/asp/14382-asp-bild-filnamn
