mmm, well I wouldn't write it like that at all, you have written it like classic ASP not .Net, you don't use things like FSO in .net
this is how you would do it in a .net way
<%@ Page Language="VB" Debug="True" %>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.IO" %>
<script language="VB" runat="server">
Sub Page_Load(Sender as Object, E as EventArgs)
Dim bmp As Bitmap
Dim builder As New StringBuilder
Dim dirInfo As New DirectoryInfo(MapPath("/path/to/directory/"))
Dim files as FileInfo() = dirInfo.GetFiles("*")
builder.Append("<?xml version=\"1.0"" encoding=\"utf-8\"?>").AppendLine()
builder.Append("<images>").AppendLine()
For Each File In files
bmp = New Bitmap(File.Name)
builder.Append("<image>").AppendLine()
builder.AppendFormat("<date>{0}</date>,File.LastWriteTime.ToShortDateString()").AppendLine()
builder.AppendFormat("<height>{0}</height>",bmp.Height).AppendLine()
builder.AppendFormat("<name>{0}</name>",Path.GetFileName(File)).AppendLine()
builder.AppendFormat("<size>{0}</size>",bmp.Size).AppendLine()
builder.AppendFormat("<width>{0}</width>",bmp.Width).AppendLine()
builder.Append("</image>").AppendLine()
Next
builder.Append("</images>")
Dim s As String = builder.ToString
Response.Write(s)
End Sub
</script>
I don't normally write VB, much prefer C# so not tested and my not be 100% correct