Re: Detecting PDF files in a folder and sorting them by date



Burnsy,

I am about to write an application that will display all pdf files in a
folder and display them by file name in order of date.

Is there an easy way of doing this? I was thinking about somehow adding
filename and date created in an array, sorting by date and then
printing onto an html page with a link to that file. How would I do
this though? Is this the simplest method or is there a better way of
doin this?

I will not write the code for you but pretty much you have the idea right.

Read the directory, if you don't want to find mimetypes and just do it by extension find all files that have a .pdf.

Then when you find one of those files have the array do something like:
$arr[file_date_here] = ['name']. This however is not really expandable but will work.


Then you can sort by the index of the array and do a simple foreach as key value.

Mike

.



Relevant Pages

  • Re: Help end the testing tedium please
    ... When you call it from Consolidate ... Please assume that both the filename and the ... worksheet name are sequential. ... the file really were test1 thru test60, would the array statement need ...
    (microsoft.public.excel.programming)
  • Re: Help end the testing tedium please
    ... When you call it from Consolidate ... Please assume that both the filename and the ... the file really were test1 thru test60, would the array statement need ... With Selection ...
    (microsoft.public.excel.programming)
  • Re: help urgent
    ... Declare a dynamic array of stuctures. ... > in the event handler should display an OpenFileDialog allowing the user ... load the date from each array member into the combo box. ...
    (microsoft.public.vb.general.discussion)
  • Re: pass an array throuh a function
    ... >The array would record the data from the user from one function.AND another ... >once the user is done and send it to the display function. ... your displayfunction is going through a loop. ... int count; ...
    (alt.comp.lang.learn.c-cpp)
  • Re: error 3048 - Cannot open any more databases
    ... recommendations and I declared my array as static and also loaded the array ... Yes the bound column of my combo boxes are not the display column. ... the same subform, just inserted 48 times. ...
    (microsoft.public.access.formscoding)