K
Ken Fine
I'd like my FSO script to act only on files that fit a pattern, files that
include "icon" in the name.
Below, I have FSO code that acts on files that begin with "icon" and have an
extension of .jpg.
I'd prefer it if the script would act in instances where "icon" appeared
anywhere in the filename.
Any help out there?
Thanks...
Dim fso, f, f1, fc, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(folder)
Set fc = f.Files
For Each f1 in fc
if fso.GetExtensionName(f1) = "jpg" and left(f1.name,4) = "icon" Then
%> <img
src=http://whatever.whatever.com/path/<%Response.Write(f1.name)%>><br> <%
end if
Next
%>
include "icon" in the name.
Below, I have FSO code that acts on files that begin with "icon" and have an
extension of .jpg.
I'd prefer it if the script would act in instances where "icon" appeared
anywhere in the filename.
Any help out there?
Thanks...
Dim fso, f, f1, fc, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(folder)
Set fc = f.Files
For Each f1 in fc
if fso.GetExtensionName(f1) = "jpg" and left(f1.name,4) = "icon" Then
%> <img
src=http://whatever.whatever.com/path/<%Response.Write(f1.name)%>><br> <%
end if
Next
%>