Thanks David. Actually LATE LATE last night, I got it to work by using the
following code for anyone interested:

<CFDIRECTORY 
        action="list" 
        DIRECTORY="D:\Inetpub\wwwroot\images"
        name="listing"
        sort="Name">
        
<CFOUTPUT query="listing">

#name#<BR>
</CFOUTPUT>
                
                
<CFLOOP query="listing" startrow="3">
<CFQUERY datasource="botb" name="uploadFile">
INSERT INTO 
                Parts 
                VALUES
('#Replace(listing.name,".gif","","ALL")#','1','1','1','1','#DateFormat(now(
))#','#DateFormat(now())#')
</CFQUERY>

</CFLOOP>

-----Original Message-----
From: David Shadovitz [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 06, 2000 1:38 AM
To: [EMAIL PROTECTED]
Subject: Re: CFDIRECTORY question


You can trim the extension via #ListFirst(qDirectory.Name,".")#>
(assuming there's only one period per file name).
What's wrong with a simple <CFQUERY>insert....</CFQUERY>?

-David

On Tue, 5 Sep 2000 Jacob McKee <[EMAIL PROTECTED]> writes:
> Please help!
> 
> I need to know how to read all the files in a directory, trim the 
> .gif or
> .jpg or what ever extension off and create a database record based 
> on that
> file name.
> 
> With the <CFDIRECTORY>, I can read a list of the files, but I can't 
> get the
> INSERT to work. I also don't have any idea how to trim the extension 
> off the
> file name. 
________________________________________________________________
YOU'RE PAYING TOO MUCH FOR THE INTERNET!
Juno now offers FREE Internet Access!
Try it today - there's no risk!  For your FREE software, visit:
http://dl.www.juno.com/get/tagj.
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to