Reply
Filesystem object - paging
Old 01-21-2009, 06:23 PM Filesystem object - paging
tonya's Avatar
Ultra Talker

Posts: 440
Location: world traveller based in UK
Trades: 0
Is there a way to break my list of files in a folder into chunks???

So instead of 60 files I can have 6 pages of ten or 3 pages of twenty or whatever ???

I have only ever done paging with recordsets from a database

I am writing code from scratch so anyone with any new code or code tips please advise.

Code:
<% 
    folder = "C:\" 
 
    set fso = CreateObject("Scripting.fileSystemObject") 
    set fold = fso.getFolder(folder) 
    for each file in fold.files 
        response.write file.name & "<br>" 
    next 
    set fold = nothing: set fso = nothing 
%>
__________________
Tonya

:: my personal site :: Marine Biology Site
tonya is offline
Reply With Quote
View Public Profile Visit tonya's homepage!
 
 
When You Register, These Ads Go Away!
Old 01-21-2009, 06:35 PM Re: Filesystem object - paging
chrishirst's Avatar
Super Moderator

Posts: 22,318
Location: Blackpool. UK
Trades: 0
http://www.haneng.com/asp-forum/Pagi...ject_4562.html

pulling out some old bookmarks tonight
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 01-21-2009, 06:40 PM Re: Filesystem object - paging
tonya's Avatar
Ultra Talker

Posts: 440
Location: world traveller based in UK
Trades: 0
Great thanks for that - if you want to see what I have so far let me know - if not full code examples are great - I will try & read & understand so I can tailor to fit what I need

The folders actually contain pictures & I will eventually use the file name to create a thumbnail of the picture

Its a gallery script project I am working on for a small company who can't find any online utilities that work for them & want the code for their intranet system.
__________________
Tonya

:: my personal site :: Marine Biology Site
tonya is offline
Reply With Quote
View Public Profile Visit tonya's homepage!
 
Old 01-21-2009, 06:40 PM Re: Filesystem object - paging
tonya's Avatar
Ultra Talker

Posts: 440
Location: world traveller based in UK
Trades: 0
She does curtains & fabrics LOL x
__________________
Tonya

:: my personal site :: Marine Biology Site
tonya is offline
Reply With Quote
View Public Profile Visit tonya's homepage!
 
Old 01-21-2009, 06:52 PM Re: Filesystem object - paging
chrishirst's Avatar
Super Moderator

Posts: 22,318
Location: Blackpool. UK
Trades: 0
Have fun

6 or 7 years ago I built a photo gallery for this site using the FSO to read the files and folders.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 01-21-2009, 07:18 PM Re: Filesystem object - paging
tonya's Avatar
Ultra Talker

Posts: 440
Location: world traveller based in UK
Trades: 0
Thanks for the peek

I can see how it works & I want to make it look similar to the one you see on here.

http://www.bravenet.com/demo/bravene...ce=photocenter

The process of listing the files fitted with some good styling should hopefully give a nice smart result. I have worked it onto something basic but I really want to get it possibly sorting by date or name of file and also be able to page through the results so you dont end up with too many thumbnails trying to download on one page.

Its keeping me busy thats for sure - the graphics & styling is turning out to be just as much work hence sat here at 11pm lol
__________________
Tonya

:: my personal site :: Marine Biology Site
tonya is offline
Reply With Quote
View Public Profile Visit tonya's homepage!
 
Old 02-04-2009, 07:45 PM Re: Filesystem object - paging
tonya's Avatar
Ultra Talker

Posts: 440
Location: world traveller based in UK
Trades: 0
HELP HELP HELP - I still cant work out how to page through the list of files. So if the list is a 100 its soooo long

I simply want to break it up - help ????????
__________________
Tonya

:: my personal site :: Marine Biology Site
tonya is offline
Reply With Quote
View Public Profile Visit tonya's homepage!
 
Old 02-06-2009, 11:43 AM Re: Filesystem object - paging
tonya's Avatar
Ultra Talker

Posts: 440
Location: world traveller based in UK
Trades: 0
I still dont have a solution to this can anyone help ????
__________________
Tonya

:: my personal site :: Marine Biology Site
tonya is offline
Reply With Quote
View Public Profile Visit tonya's homepage!
 
Old 02-23-2009, 03:47 PM Re: Filesystem object - paging
Novice Talker

Posts: 5
Trades: 0
Here's a thread discussing the same issue you're having along with sample code. You're going to have to store the full list of files to an array and then break it up in chunks and display it that way. Also, creating an array container will also allow you to sort the lists instead of depending on the server/computer's default file system sort:

http://www.haneng.com/asp-forum/Pagi...ject_4562.html
Concept211 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Filesystem object - paging
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.38290 seconds with 13 queries