List of files by Mod Date?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

List of files by Mod Date?

Marc Pinnell-3
Before I spend too much time creating a solution, I thought I would  
ask if anyone knows of an existing Lasso one.

I have a folder of images that I want to display on the screen in  
REVERSE Chronological order based on Mod Date. [file_listdirectory]  
doesn't capture the date (from what I can tell) when the list is  
built, so I suppose I could build a couple of arrays using  
[file_moddate] and do some sorting?

TIA
Marc


------------------------------
LASSO MASTER CLASS - Orlando, FL
Following the FileMaker Developer Conference
2 Day intensive seminar: Learn the best way to get your FileMaker data on the web.
http://www.briandunning.com/lasso-training/


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: List of files by Mod Date?

Doug Gentry
So are you aren't storing info on each image in a database table,  
where you could use timestamp or something similar to direct the order?

...Doug

On Jul 20, 2006, at 11:02 AM, Marc Pinnell wrote:

> Before I spend too much time creating a solution, I thought I would  
> ask if anyone knows of an existing Lasso one.
>
> I have a folder of images that I want to display on the screen in  
> REVERSE Chronological order based on Mod Date. [file_listdirectory]  
> doesn't capture the date (from what I can tell) when the list is  
> built, so I suppose I could build a couple of arrays using  
> [file_moddate] and do some sorting?
>
> TIA
> Marc
>
>
> ------------------------------
> LASSO MASTER CLASS - Orlando, FL
> Following the FileMaker Developer Conference
> 2 Day intensive seminar: Learn the best way to get your FileMaker  
> data on the web.
> http://www.briandunning.com/lasso-training/
>
>
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription: http://www.listsearch.com/ 
> lassotalk.lasso?manage


---
Doug Gentry
Dynapolis & Southern Oregon University
p:  541-261-8501 / Toll Free: 888-490-0644
[hidden email]


------------------------------
LASSO MASTER CLASS - Orlando, FL
Following the FileMaker Developer Conference
2 Day intensive seminar: Learn the best way to get your FileMaker data on the web.
http://www.briandunning.com/lasso-training/


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: List of files by Mod Date?

Mason Miller
Maybe go to the command line, do an ls-l and create an array with that data.

Mason

Doug Gentry wrote:

> So are you aren't storing info on each image in a database table,
> where you could use timestamp or something similar to direct the order?
>
> ...Doug
>
> On Jul 20, 2006, at 11:02 AM, Marc Pinnell wrote:
>
>> Before I spend too much time creating a solution, I thought I would
>> ask if anyone knows of an existing Lasso one.
>>
>> I have a folder of images that I want to display on the screen in
>> REVERSE Chronological order based on Mod Date. [file_listdirectory]
>> doesn't capture the date (from what I can tell) when the list is
>> built, so I suppose I could build a couple of arrays using
>> [file_moddate] and do some sorting?
>>
>> TIA
>> Marc
>>
>>
>> ------------------------------
>> LASSO MASTER CLASS - Orlando, FL
>> Following the FileMaker Developer Conference
>> 2 Day intensive seminar: Learn the best way to get your FileMaker
>> data on the web.
>> http://www.briandunning.com/lasso-training/
>>
>>
>> ------------------------------
>> Lasso Support: http://support.omnipilot.com/
>> Search the list archives: http://www.listsearch.com/lassotalk.lasso
>> Manage your list subscription:
>> http://www.listsearch.com/lassotalk.lasso?manage
>
>
> ---
> Doug Gentry
> Dynapolis & Southern Oregon University
> p:  541-261-8501 / Toll Free: 888-490-0644
> [hidden email]
>
>
> ------------------------------
> LASSO MASTER CLASS - Orlando, FL
> Following the FileMaker Developer Conference
> 2 Day intensive seminar: Learn the best way to get your FileMaker data
> on the web.
> http://www.briandunning.com/lasso-training/
>
>
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription:
> http://www.listsearch.com/lassotalk.lasso?manage


------------------------------
LASSO MASTER CLASS - Orlando, FL
Following the FileMaker Developer Conference
2 Day intensive seminar: Learn the best way to get your FileMaker data on the web.
http://www.briandunning.com/lasso-training/


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: List of files by Mod Date?

Marc Pinnell-3
In reply to this post by Doug Gentry
Correct, but maybe I will need to. I'm beginning to think that doing  
dynamically (each time the page loads) will be too much overhead.

marc

On Jul 20, 2006, at 11:42 AM, Doug Gentry wrote:

> So are you aren't storing info on each image in a database table,  
> where you could use timestamp or something similar to direct the  
> order?
>
> ...Doug
>
> On Jul 20, 2006, at 11:02 AM, Marc Pinnell wrote:
>
>> Before I spend too much time creating a solution, I thought I  
>> would ask if anyone knows of an existing Lasso one.
>>
>> I have a folder of images that I want to display on the screen in  
>> REVERSE Chronological order based on Mod Date.  
>> [file_listdirectory] doesn't capture the date (from what I can  
>> tell) when the list is built, so I suppose I could build a couple  
>> of arrays using [file_moddate] and do some sorting?
>>
>> TIA
>> Marc
>>
>>
>> ------------------------------
>> LASSO MASTER CLASS - Orlando, FL
>> Following the FileMaker Developer Conference
>> 2 Day intensive seminar: Learn the best way to get your FileMaker  
>> data on the web.
>> http://www.briandunning.com/lasso-training/
>>
>>
>> ------------------------------
>> Lasso Support: http://support.omnipilot.com/
>> Search the list archives: http://www.listsearch.com/lassotalk.lasso
>> Manage your list subscription: http://www.listsearch.com/ 
>> lassotalk.lasso?manage
>
>
> ---
> Doug Gentry
> Dynapolis & Southern Oregon University
> p:  541-261-8501 / Toll Free: 888-490-0644
> [hidden email]
>
>
> ------------------------------
> LASSO MASTER CLASS - Orlando, FL
> Following the FileMaker Developer Conference
> 2 Day intensive seminar: Learn the best way to get your FileMaker  
> data on the web.
> http://www.briandunning.com/lasso-training/
>
>
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription: http://www.listsearch.com/ 
> lassotalk.lasso?manage


------------------------------
LASSO MASTER CLASS - Orlando, FL
Following the FileMaker Developer Conference
2 Day intensive seminar: Learn the best way to get your FileMaker data on the web.
http://www.briandunning.com/lasso-training/


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: List of files by Mod Date?

Tim Taplin
yes.  when you set the image variable, it loads the image into RAM.  
very time consuming if you have many images on a page.
  Not sure if using the describe tag would allow you to parse the mod  
date out without loading image.

Tim Taplin

On Jul 20, 2006, at 12:53 PM, Marc Pinnell wrote:

> Correct, but maybe I will need to. I'm beginning to think that  
> doing dynamically (each time the page loads) will be too much  
> overhead.
>
> marc
>
> On Jul 20, 2006, at 11:42 AM, Doug Gentry wrote:
>
>> So are you aren't storing info on each image in a database table,  
>> where you could use timestamp or something similar to direct the  
>> order?
>>
>> ...Doug
>>
>> On Jul 20, 2006, at 11:02 AM, Marc Pinnell wrote:
>>
>>> Before I spend too much time creating a solution, I thought I  
>>> would ask if anyone knows of an existing Lasso one.
>>>
>>> I have a folder of images that I want to display on the screen in  
>>> REVERSE Chronological order based on Mod Date.  
>>> [file_listdirectory] doesn't capture the date (from what I can  
>>> tell) when the list is built, so I suppose I could build a couple  
>>> of arrays using [file_moddate] and do some sorting?
>>>
>>> TIA
>>> Marc
>>>
>>>
>>> ------------------------------
>>> LASSO MASTER CLASS - Orlando, FL
>>> Following the FileMaker Developer Conference
>>> 2 Day intensive seminar: Learn the best way to get your FileMaker  
>>> data on the web.
>>> http://www.briandunning.com/lasso-training/
>>>
>>>
>>> ------------------------------
>>> Lasso Support: http://support.omnipilot.com/
>>> Search the list archives: http://www.listsearch.com/lassotalk.lasso
>>> Manage your list subscription: http://www.listsearch.com/ 
>>> lassotalk.lasso?manage
>>
>>
>> ---
>> Doug Gentry
>> Dynapolis & Southern Oregon University
>> p:  541-261-8501 / Toll Free: 888-490-0644
>> [hidden email]
>>
>>
>> ------------------------------
>> LASSO MASTER CLASS - Orlando, FL
>> Following the FileMaker Developer Conference
>> 2 Day intensive seminar: Learn the best way to get your FileMaker  
>> data on the web.
>> http://www.briandunning.com/lasso-training/
>>
>>
>> ------------------------------
>> Lasso Support: http://support.omnipilot.com/
>> Search the list archives: http://www.listsearch.com/lassotalk.lasso
>> Manage your list subscription: http://www.listsearch.com/ 
>> lassotalk.lasso?manage
>
>
> ------------------------------
> LASSO MASTER CLASS - Orlando, FL
> Following the FileMaker Developer Conference
> 2 Day intensive seminar: Learn the best way to get your FileMaker  
> data on the web.
> http://www.briandunning.com/lasso-training/
>
>
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription: http://www.listsearch.com/ 
> lassotalk.lasso?manage
>


------------------------------
LASSO MASTER CLASS - Orlando, FL
Following the FileMaker Developer Conference
2 Day intensive seminar: Learn the best way to get your FileMaker data on the web.
http://www.briandunning.com/lasso-training/


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: List of files by Mod Date?

Fletcher Sandbeck
In reply to this post by Marc Pinnell-3
On 2006-07-20 at 11:02 by [hidden email] (Marc Pinnell):

>Before I spend too much time creating a solution, I thought I would  
>ask if anyone knows of an existing Lasso one.
>
>I have a folder of images that I want to display on the screen in  
>REVERSE Chronological order based on Mod Date. [file_listdirectory]  
>doesn't capture the date (from what I can tell) when the list is  
>built, so I suppose I could build a couple of arrays using  
>[file_moddate] and do some sorting?

You can do it like this.  You get a list of files in an array $files.  Then use [Array->ForEach] to replace each item in the array with a pair representing the mod date and the file name.  Remove any files without mod dates (mostly directories).  Then, sort the array in descending order.  And, output the array.

var: 'files' = (file_listdirectory: '/');
$files->(foreach: {params->first = (pair: (date: (file_moddate: params->first))->(format: '%Q %T') = params->first); return: true;});
$files->(removeall: '0000-01-01 00:00:00');
$files->(sort: false);
iterate: $files, (var: 'file');
  $file->second + ' (' $file->first + ')<br />';
/iterate;

You might also want to filter based on file name so you get only images (if the folder contains other files).  It seems pretty fast in my testing, but I only have 40 or 50 items in my home directory.

[fletcher]
--
Fletcher Sandbeck                         [hidden email]
Director of Product Development       http://www.lassostudio.com
OmniPilot Software, Inc.                http://www.omnipilot.com

------------------------------
LASSO MASTER CLASS - Orlando, FL
Following the FileMaker Developer Conference
2 Day intensive seminar: Learn the best way to get your FileMaker data on the web.
http://www.briandunning.com/lasso-training/


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: List of files by Mod Date?

Marc Pinnell-3
Perfect and way easier than I was thinking. Thanx again!

Marc


On Jul 20, 2006, at 12:51 PM, Fletcher Sandbeck wrote:

> On 2006-07-20 at 11:02 by [hidden email] (Marc Pinnell):
>
>> Before I spend too much time creating a solution, I thought I would
>> ask if anyone knows of an existing Lasso one.
>>
>> I have a folder of images that I want to display on the screen in
>> REVERSE Chronological order based on Mod Date. [file_listdirectory]
>> doesn't capture the date (from what I can tell) when the list is
>> built, so I suppose I could build a couple of arrays using
>> [file_moddate] and do some sorting?
>
> You can do it like this.  You get a list of files in an array  
> $files.  Then use [Array->ForEach] to replace each item in the  
> array with a pair representing the mod date and the file name.  
> Remove any files without mod dates (mostly directories).  Then,  
> sort the array in descending order.  And, output the array.
>
> var: 'files' = (file_listdirectory: '/');
> $files->(foreach: {params->first = (pair: (date: (file_moddate:  
> params->first))->(format: '%Q %T') = params->first); return: true;});
> $files->(removeall: '0000-01-01 00:00:00');
> $files->(sort: false);
> iterate: $files, (var: 'file');
>   $file->second + ' (' $file->first + ')<br />';
> /iterate;
>
> You might also want to filter based on file name so you get only  
> images (if the folder contains other files).  It seems pretty fast  
> in my testing, but I only have 40 or 50 items in my home directory.
>
> [fletcher]
> --
> Fletcher Sandbeck                         [hidden email]
> Director of Product Development       http://www.lassostudio.com
> OmniPilot Software, Inc.                http://www.omnipilot.com
>
> ------------------------------
> LASSO MASTER CLASS - Orlando, FL
> Following the FileMaker Developer Conference
> 2 Day intensive seminar: Learn the best way to get your FileMaker  
> data on the web.
> http://www.briandunning.com/lasso-training/
>
>
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription:
> http://www.listsearch.com/lassotalk.lasso?manage


------------------------------
LASSO MASTER CLASS - Orlando, FL
Following the FileMaker Developer Conference
2 Day intensive seminar: Learn the best way to get your FileMaker data on the web.
http://www.briandunning.com/lasso-training/


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage