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=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
                                

Reply via email to