| |
darkmunk
Posts: 4
Score: 0
Joined: 1/16/2007
Status: offline
|
I have a loop which successfully populates a drop down with filenames but if the filename ends in 'LCK' I would like the loop to miss out that name. I have tried all sorts but nothing works properly. any ideas, thanks. My code: [code] select name="event" id="event"> <option value="">Please select... </option> <% set fso=Server.CreateObject("Scripting.FileSystemObject") myPath = Server.MapPath("/races/") set fObj=fso.GetFolder(myPath) for each x in fObj.files 'if Right(x.name,3) = "LCK" then ---- miss out this filename and move to the next ---- fileNameX = x.Name baseName = fso.GetBaseName(myPath &"\"& fileNameX) trimBaseName =(Mid(baseName,3)) %> <option value="<%=trimBaseName%>"><%=trimBaseName%></option> <% next set fo=nothing set fs=nothing %> </select>[/CODE]
|
|