If speed is an issue:
create a template that gets executed at a convient time (every 30 mins?)
and CFDirectory travereses the tree and adds the name/path of modified
files to a sessionvar|query|db|xml|text-file
(and also make it possible to trigger that on request)
-------------------------------------------------------------
Hugo Ahlenius E-Mail: [EMAIL PROTECTED]
Project Officer Phone: +46 8 230460
UNEP GRID-Arendal Fax: +46 8 230441
Stockholm Office Mobile: +46 733 467111
WWW: http://www.grida.no
-------------------------------------------------------------
| -----Original Message-----
| From: Calvin Ward [mailto:[EMAIL PROTECTED]
| Sent: Wednesday, July 30, 2003 12:52
| To: CF-Talk
| Subject: Re: Finding recently modified files in subdirectories
|
|
| Stephen,
|
| CFDirectory fails the speed consideration, when enumerating
| sub directories
| it isn't fast enough, especially when you can't count on Windows 2000
| delivering a last modified date that is relevant to all files in all
| subdirectories for a given directory. If Win2k did that, then
| it would be
| quite fast enough as I'd only have to recurse the directories
| that contained
| changed items instead of all of them.
|
| In other words, to use CFDirectory, I have to actually traverse every
| directory in the file structure and compare the
| lastModifiedDate with the
| time frame I'm interested in (say 24 hours). This operation
| takes roughly 60
| seconds, which is entirely too long, when all I'm interested
| in is the files
| that were modified in the last day, frequently only about 10 or so.
|
| So, actually there are 3 goals:
|
| 1) has to talk to CFMX
| 2) has to work on win2k
| 3) has to be fast, goal is roughly 10-15 seconds.
|
| :)
|
| - Calvin
|
| ----- Original Message -----
| From: "Stephen Moretti" <[EMAIL PROTECTED]>
| To: "CF-Talk" <[EMAIL PROTECTED]>
| Sent: Wednesday, July 30, 2003 6:43 AM
| Subject: Re: Finding recently modified files in subdirectories
|
|
| > >
| > > I'm looking for a way to find all files that were modified in a
| directory
| > and it's subdirectories.
| > >
| > > The trick is that it has to be very fast, and ColdFusion
| MX has to be
| able
| > to talk to it. Has anyone found such a solution?
| > >
| >
| >
| > Look at CFDirectory. This returns a query set with one of
| the columns
| being
| > dateLastModified.
| >
| >
| http://livedocs.macromedia.com/cfmxdocs/CFML_Reference/Tags-pt
121.jsp#1097918
>
> Obviously you need to decide how you know when a file was previously
> modified for this information to be useful, but hopefully this will put
you
> on the right track.
>
> Stephen
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community.
http://www.fusionauthority.com/ads.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4