Re: Automatic File List in Database

2003-03-24 Thread Bryan Stevenson
Well you could use CFDIRECTORY to get the file list and store it in the
database.  To keep that list current is another matter.  It depends on how
current the list needs to be (or how often the files change).  If it's not
too frequently you could have a scheduled task that routinely deletes the
file list from the database and sticks in the current list (same way you
would get it in the database initially).

HTH

Bryan Stevenson B.Comm.
VP  Director of E-Commerce Development
Electric Edge Systems Group Inc.
t. 250.920.8830
e. [EMAIL PROTECTED]

-
Macromedia Associate Partner
www.macromedia.com
-
Vancouver Island ColdFusion Users Group
Founder  Director
www.cfug-vancouverisland.com
- Original Message -
From: Michael Pool [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Monday, March 24, 2003 4:36 PM
Subject: Automatic File List in Database


 How would be the easiest way to get a directories file names imported into
a
 database and keep them updated automatically whenever a new file is
created?

 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: Automatic File List in Database

2003-03-24 Thread Barney Boisvert
Is performance a huge issue?  If it's not, just use the database named 'the
filesystem' and 'query' it with CFDIRECTORY rather than CFQUERY.  If that
won't work for whatever reason, you'd have to use a scheduled task to use
CFDIRECTORY and refresh the database periodically.  The former will result
in instant updates with no administrative overhead, the latter will be
faster for recalling, but cost to maintain the database.

barneyb

---
Barney Boisvert, Senior Development Engineer
AudienceCentral (formerly PIER System, Inc.)
[EMAIL PROTECTED]
voice : 360.671.8708 x12
fax   : 360.647.5351

www.audiencecentral.com

 -Original Message-
 From: Michael Pool [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 24, 2003 4:37 PM
 To: CF-Talk
 Subject: Automatic File List in Database


 How would be the easiest way to get a directories file names
 imported into a
 database and keep them updated automatically whenever a new file
 is created?

 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=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



Re: Automatic File List in Database

2003-03-24 Thread Bryan Stevenson
Now that I think of it...why store the file list in the DB?  Why not just
use CFDIRECTORY when the list is needed...that way it's always current and
there is no maintenance required.

Of course you may have some reason to store it, but there ya go ;-)

Bryan Stevenson B.Comm.
VP  Director of E-Commerce Development
Electric Edge Systems Group Inc.
t. 250.920.8830
e. [EMAIL PROTECTED]

-
Macromedia Associate Partner
www.macromedia.com
-
Vancouver Island ColdFusion Users Group
Founder  Director
www.cfug-vancouverisland.com
- Original Message -
From: Bryan Stevenson [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Monday, March 24, 2003 1:53 PM
Subject: Re: Automatic File List in Database


 Well you could use CFDIRECTORY to get the file list and store it in the
 database.  To keep that list current is another matter.  It depends on how
 current the list needs to be (or how often the files change).  If it's not
 too frequently you could have a scheduled task that routinely deletes the
 file list from the database and sticks in the current list (same way you
 would get it in the database initially).

 HTH

 Bryan Stevenson B.Comm.
 VP  Director of E-Commerce Development
 Electric Edge Systems Group Inc.
 t. 250.920.8830
 e. [EMAIL PROTECTED]

 -
 Macromedia Associate Partner
 www.macromedia.com
 -
 Vancouver Island ColdFusion Users Group
 Founder  Director
 www.cfug-vancouverisland.com
 - Original Message -
 From: Michael Pool [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Monday, March 24, 2003 4:36 PM
 Subject: Automatic File List in Database


  How would be the easiest way to get a directories file names imported
into
 a
  database and keep them updated automatically whenever a new file is
 created?
 
 
 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: Automatic File List in Database

2003-03-24 Thread Michael Pool
The file list holds images and drawings, which need descriptions in another
field in order to be selected. There are thousands of files and the files
have strange naming conventions. Best I can figure, I need a field with
paths and a field with descriptions, so I can call them up and display them
in the page. I tried using CFDIRECTORY, but describing the files is the main
thing.



- Original Message -
From: Bryan Stevenson [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Monday, March 24, 2003 1:59 PM
Subject: Re: Automatic File List in Database


 Now that I think of it...why store the file list in the DB?  Why not just
 use CFDIRECTORY when the list is needed...that way it's always current and
 there is no maintenance required.

 Of course you may have some reason to store it, but there ya go ;-)

 Bryan Stevenson B.Comm.
 VP  Director of E-Commerce Development
 Electric Edge Systems Group Inc.
 t. 250.920.8830
 e. [EMAIL PROTECTED]

 -
 Macromedia Associate Partner
 www.macromedia.com
 -
 Vancouver Island ColdFusion Users Group
 Founder  Director
 www.cfug-vancouverisland.com
 - Original Message -
 From: Bryan Stevenson [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Monday, March 24, 2003 1:53 PM
 Subject: Re: Automatic File List in Database


  Well you could use CFDIRECTORY to get the file list and store it in the
  database.  To keep that list current is another matter.  It depends on
how
  current the list needs to be (or how often the files change).  If it's
not
  too frequently you could have a scheduled task that routinely deletes
the
  file list from the database and sticks in the current list (same way you
  would get it in the database initially).
 
  HTH
 
  Bryan Stevenson B.Comm.
  VP  Director of E-Commerce Development
  Electric Edge Systems Group Inc.
  t. 250.920.8830
  e. [EMAIL PROTECTED]
 
  -
  Macromedia Associate Partner
  www.macromedia.com
  -
  Vancouver Island ColdFusion Users Group
  Founder  Director
  www.cfug-vancouverisland.com
  - Original Message -
  From: Michael Pool [EMAIL PROTECTED]
  To: CF-Talk [EMAIL PROTECTED]
  Sent: Monday, March 24, 2003 4:36 PM
  Subject: Automatic File List in Database
 
 
   How would be the easiest way to get a directories file names imported
 into
  a
   database and keep them updated automatically whenever a new file is
  created?
  
  
 
 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: Automatic File List in Database

2003-03-24 Thread Philip Arnold
 The file list holds images and drawings, which need
 descriptions in another field in order to be selected. There
 are thousands of files and the files have strange naming
 conventions. Best I can figure, I need a field with paths and
 a field with descriptions, so I can call them up and display
 them in the page. I tried using CFDIRECTORY, but describing
 the files is the main thing.

If the description isn't always going to be there, then why not have the
location and file name, plus the description in the database, that way
you can reference it for those that it needs

Then use a Query of Query to join the CFDIRECTORY result to the
information in the database

Would that work?


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: Automatic File List in Database

2003-03-24 Thread Barney Boisvert
For situations like this (uploaded files in a CMS, web-based FTP on
steroids, etc), I make a table that stores a filename, title, description,
and watever else, and then put put all the files in a single directory.
Then when you want the file, you use the 'filename' field to go get it form
the directory.

The one caveat to make is that files added directly to the file system are
never visible in the CF interface.  Files must be added through the CF
interface.  This also lets you automatically rename files without the user
needing to care if two people both want to upload 'my_picture.jpg'.  There's
no reason you couldn't make a scraper that'd scrape the file system looking
for files not in the DB, and then add them with a null description if
keeping things synched from that direction is important.

HTH,
barneyb

---
Barney Boisvert, Senior Development Engineer
AudienceCentral (formerly PIER System, Inc.)
[EMAIL PROTECTED]
voice : 360.671.8708 x12
fax   : 360.647.5351

www.audiencecentral.com

 -Original Message-
 From: Michael Pool [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 24, 2003 5:07 PM
 To: CF-Talk
 Subject: Re: Automatic File List in Database


 The file list holds images and drawings, which need descriptions
 in another
 field in order to be selected. There are thousands of files and the files
 have strange naming conventions. Best I can figure, I need a field with
 paths and a field with descriptions, so I can call them up and
 display them
 in the page. I tried using CFDIRECTORY, but describing the files
 is the main
 thing.



 - Original Message -
 From: Bryan Stevenson [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Monday, March 24, 2003 1:59 PM
 Subject: Re: Automatic File List in Database


  Now that I think of it...why store the file list in the DB?
 Why not just
  use CFDIRECTORY when the list is needed...that way it's always
 current and
  there is no maintenance required.
 
  Of course you may have some reason to store it, but there ya go ;-)
 
  Bryan Stevenson B.Comm.
  VP  Director of E-Commerce Development
  Electric Edge Systems Group Inc.
  t. 250.920.8830
  e. [EMAIL PROTECTED]
 
  -
  Macromedia Associate Partner
  www.macromedia.com
  -
  Vancouver Island ColdFusion Users Group
  Founder  Director
  www.cfug-vancouverisland.com
  - Original Message -
  From: Bryan Stevenson [EMAIL PROTECTED]
  To: CF-Talk [EMAIL PROTECTED]
  Sent: Monday, March 24, 2003 1:53 PM
  Subject: Re: Automatic File List in Database
 
 
   Well you could use CFDIRECTORY to get the file list and store
 it in the
   database.  To keep that list current is another matter.  It depends on
 how
   current the list needs to be (or how often the files change).  If it's
 not
   too frequently you could have a scheduled task that routinely deletes
 the
   file list from the database and sticks in the current list
 (same way you
   would get it in the database initially).
  
   HTH
  
   Bryan Stevenson B.Comm.
   VP  Director of E-Commerce Development
   Electric Edge Systems Group Inc.
   t. 250.920.8830
   e. [EMAIL PROTECTED]
  
   -
   Macromedia Associate Partner
   www.macromedia.com
   -
   Vancouver Island ColdFusion Users Group
   Founder  Director
   www.cfug-vancouverisland.com
   - Original Message -
   From: Michael Pool [EMAIL PROTECTED]
   To: CF-Talk [EMAIL PROTECTED]
   Sent: Monday, March 24, 2003 4:36 PM
   Subject: Automatic File List in Database
  
  
How would be the easiest way to get a directories file
 names imported
  into
   a
database and keep them updated automatically whenever a new file is
   created?
   
   
  
 
 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=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



Re: Automatic File List in Database

2003-03-24 Thread Michael Pool
That may work...I think.have you got an example of that code?


- Original Message -
From: Philip Arnold [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Monday, March 24, 2003 2:21 PM
Subject: RE: Automatic File List in Database


  The file list holds images and drawings, which need
  descriptions in another field in order to be selected. There
  are thousands of files and the files have strange naming
  conventions. Best I can figure, I need a field with paths and
  a field with descriptions, so I can call them up and display
  them in the page. I tried using CFDIRECTORY, but describing
  the files is the main thing.

 If the description isn't always going to be there, then why not have the
 location and file name, plus the description in the database, that way
 you can reference it for those that it needs

 Then use a Query of Query to join the CFDIRECTORY result to the
 information in the database

 Would that work?


 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=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



RE: Automatic File List in Database

2003-03-24 Thread Philip Arnold
 That may work...I think.have you got an example of that code?

At this point, no, but I can put some code together later...

If you've still got the problem by tomorrow morning, I'll see what I can
do then


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: Automatic File List in Database

2003-03-24 Thread Jerry Johnson
Before you settle into a solution, what type of files are you talking about?

I have solved this a couple of different ways.

1. Directories of htm and cfm and pdf files. I embedded extra tags in a comments 
section at the top of the file.

bangdashdash
DESCRIPTIONDescription Goes Here/DESCRIPTION
TEASERThis is the short line of text to display on listing pages/TEASER
ISSUEDATEJan 13, 2003/ISSUEDATE
dashdash

Then used Verity to search and retrieve these fields from the files, inlcuding path, 
URL, and these extra FIELDS.

2. Married each file with an info file stored in the same directory with the same name 
but extra extension.

Jerry.jpg
Jerry.jpg.nfo
or 
Jerry.jpg.txt
or 
Jerry.jpg.xml
And then place all the extra info into that file. Easy to find. Easy to see when 
missing.

3. For those files with short simple desc, just add the desc to the filename or 
directory name.

MA20030317_News Story_Boy Bitten By Dog.htm

Just some ideas,
Jerry Johnson

 [EMAIL PROTECTED] 03/24/03 08:23PM 
That may work...I think.have you got an example of that code?


- Original Message -
From: Philip Arnold [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Monday, March 24, 2003 2:21 PM
Subject: RE: Automatic File List in Database


  The file list holds images and drawings, which need
  descriptions in another field in order to be selected. There
  are thousands of files and the files have strange naming
  conventions. Best I can figure, I need a field with paths and
  a field with descriptions, so I can call them up and display
  them in the page. I tried using CFDIRECTORY, but describing
  the files is the main thing.

 If the description isn't always going to be there, then why not have the
 location and file name, plus the description in the database, that way
 you can reference it for those that it needs

 Then use a Query of Query to join the CFDIRECTORY result to the
 information in the database

 Would that work?


 

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: Automatic File List in Database

2003-03-24 Thread Michael Pool
NO VERITY. CF_UNFORTUNATELY

BlueDragon



- Original Message -
From: Jerry Johnson [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Monday, March 24, 2003 2:41 PM
Subject: Re: Automatic File List in Database


 Before you settle into a solution, what type of files are you talking
about?

 I have solved this a couple of different ways.

 1. Directories of htm and cfm and pdf files. I embedded extra tags in a
comments section at the top of the file.

 bangdashdash
 DESCRIPTIONDescription Goes Here/DESCRIPTION
 TEASERThis is the short line of text to display on listing
pages/TEASER
 ISSUEDATEJan 13, 2003/ISSUEDATE
 dashdash

 Then used Verity to search and retrieve these fields from the files,
inlcuding path, URL, and these extra FIELDS.

 2. Married each file with an info file stored in the same directory with
the same name but extra extension.

 Jerry.jpg
 Jerry.jpg.nfo
 or
 Jerry.jpg.txt
 or
 Jerry.jpg.xml
 And then place all the extra info into that file. Easy to find. Easy to
see when missing.

 3. For those files with short simple desc, just add the desc to the
filename or directory name.

 MA20030317_News Story_Boy Bitten By Dog.htm

 Just some ideas,
 Jerry Johnson

  [EMAIL PROTECTED] 03/24/03 08:23PM 
 That may work...I think.have you got an example of that code?


 - Original Message -
 From: Philip Arnold [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Monday, March 24, 2003 2:21 PM
 Subject: RE: Automatic File List in Database


   The file list holds images and drawings, which need
   descriptions in another field in order to be selected. There
   are thousands of files and the files have strange naming
   conventions. Best I can figure, I need a field with paths and
   a field with descriptions, so I can call them up and display
   them in the page. I tried using CFDIRECTORY, but describing
   the files is the main thing.
 
  If the description isn't always going to be there, then why not have the
  location and file name, plus the description in the database, that way
  you can reference it for those that it needs
 
  Then use a Query of Query to join the CFDIRECTORY result to the
  information in the database
 
  Would that work?
 
 
 

 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: Automatic File List in Database

2003-03-24 Thread Jerry Johnson
Option 2 or 3 could still work. They don't use verity at all.

The question I usually ask when choosing db vs file based storage:

Do you need to search through the items? Do you need to manipulate them quickly? If 
so, db is good.

If not, where it is more a CFDIRECTORY married to some extra info, I prefer the file 
based solutions.

I also find the file based solutions easier and quicker to change structurally.

For example, my music collection of mp3s is sorted into directories by Genre, Artist, 
Album, Song. I have different xml info files in each directory which handle the extra 
info associated with each of these entity types.


FWIW
Jerry Johnson


 [EMAIL PROTECTED] 03/24/03 08:39PM 
NO VERITY. CF_UNFORTUNATELY

BlueDragon



- Original Message -
From: Jerry Johnson [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Monday, March 24, 2003 2:41 PM
Subject: Re: Automatic File List in Database


 Before you settle into a solution, what type of files are you talking
about?

 I have solved this a couple of different ways.

 1. Directories of htm and cfm and pdf files. I embedded extra tags in a
comments section at the top of the file.

 bangdashdash
 DESCRIPTIONDescription Goes Here/DESCRIPTION
 TEASERThis is the short line of text to display on listing
pages/TEASER
 ISSUEDATEJan 13, 2003/ISSUEDATE
 dashdash

 Then used Verity to search and retrieve these fields from the files,
inlcuding path, URL, and these extra FIELDS.

 2. Married each file with an info file stored in the same directory with
the same name but extra extension.

 Jerry.jpg
 Jerry.jpg.nfo
 or
 Jerry.jpg.txt
 or
 Jerry.jpg.xml
 And then place all the extra info into that file. Easy to find. Easy to
see when missing.

 3. For those files with short simple desc, just add the desc to the
filename or directory name.

 MA20030317_News Story_Boy Bitten By Dog.htm

 Just some ideas,
 Jerry Johnson

  [EMAIL PROTECTED] 03/24/03 08:23PM 
 That may work...I think.have you got an example of that code?


 - Original Message -
 From: Philip Arnold [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Monday, March 24, 2003 2:21 PM
 Subject: RE: Automatic File List in Database


   The file list holds images and drawings, which need
   descriptions in another field in order to be selected. There
   are thousands of files and the files have strange naming
   conventions. Best I can figure, I need a field with paths and
   a field with descriptions, so I can call them up and display
   them in the page. I tried using CFDIRECTORY, but describing
   the files is the main thing.
 
  If the description isn't always going to be there, then why not have the
  location and file name, plus the description in the database, that way
  you can reference it for those that it needs
 
  Then use a Query of Query to join the CFDIRECTORY result to the
  information in the database
 
  Would that work?
 
 
 

 

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4