selecting .file range with FSO
hello,
i am trying to get a range of numbers 1-9, 10-18, 19-27 for a directory of gif images. I send through a query the page number
page 1 would be 1-9
page 2 would be 10-18
page 3 would be 19-27
and I then use the FSO like such:
for each ofile in ofolder.files
strarray(i) = "page1/" & stripfilename(ofile)
i = i +1
next
but instead of OFILE IN OFOLDER.FILES,
I want to put the range
I am not sure if this can be done, can anybody help?
"I'm a singer, not a programmer!"
[url]www.keithlubrant.com[/url]
Mark Hensler posted this at 04:31 — 9th October 2001.
He has: 4,048 posts
Joined: Aug 2000
I'm lost.
What do you want to do to these files?
Do you know the name of the files?
Quicky Code (untested)
Page = Request.QueryString("Page")
Min = ((Page - 1) * PerPage) + 1
Max = (Page * PerPage)
i=1
j=1
For Each ofile in ofolder.files
If (i > Min) AND (i < Max) Then
strarray(j) = "page1/" & stripfilename(ofile)
j = j + 1
End If
i = i + 1
Next
Mark Hensler
If there is no answer on Google, then there is no question.
klubrant posted this at 10:24 — 9th October 2001.
They have: 11 posts
Joined: Aug 2001
that was what I was looking for....
Thank you!
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.