Unfortunately it doesn't pick up this problem...

-----Original Message-----
From: Doug White [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 12:31 PM
To: CF-Talk
Subject: Re: Help with Coldfusion MX version of this code...


Run your Code Analyzer from the CF Admin page against your files, and it will
give you a detailed list of incompatible code - Very helpful applet!

======================================
Stop spam on your domain, use our gateway!
For hosting solutions http://www.clickdoug.com
ISP rated: http://www.forta.com/cf/isp/isp.cfm?isp_id=772
======================================
If you are not satisfied with my service, my job isn't done!

----- Original Message ----- 
From: "Fetter, Brad" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, July 17, 2003 2:07 PM
Subject: Help with Coldfusion MX version of this code...


| Hi guys,
|
| Yesterday we upgraded to the Coldfusion MX. Most things are working but some
code is giving us trouble.
|
| This one piece of code, now doesn't work because of periods in the variables.
The cfml looks at a directory, uploads any new files, and adds their name to the
database. The problem seems to be that it doesn't like the periods in the file
names. Any ideas how to fix this?
|
| Thanks,
| Brad Fetter
| [EMAIL PROTECTED]
| 503-372-6116
| -----------------------------------------------------
|
| <CFDIRECTORY sort="name
|              ASC,
|              size
|              DESC"
|              action="LIST" name  ="myDirectory"
|       directory="\\INTRAFLIR\media pending" >
|
| <CFSCRIPT>
| File = ArrayNew( 1);
| </cfscript>
| <CfQuery name="medialist" datasource="Portdw">
| Select Filename, Filesize
| >From Media
| </CFQUERY>
|
| <cfset path2 = medialist.recordcount/500>
| <cfset path =ceiling(path2)>
|
|
|
|
|
| <Cfoutput query="medialist">
| <CFSET ArrayAppend(File, #Filename# )>
| </CFOUTPUT>
| <cfloop query="mydirectory" >
| <CFIF '#ArrayToList(file)#' does not contain mydirectory.name >
| <cfif type eq 'dir'><cfelse>
| <CFQUERY Name="#name#" DataSource="Portdw">
|   INSERT INTO dbo.media (Filename, datein, status, filesize, filetype, path)
|    VALUES ('#name#',#now()#, 'pending', '#size#', '#type#',
'#variables.path#' )
|   </CFQUERY>
|   <cffile action="Move"
Source="d:\inetpub\wwwroot\portland\medialibrary\mediaADD\#name#"
|
Destination="d:\inetpub\wwwroot\portland\medialibrary\media\#variables.path#\">
|
|   <CFQUERY NAME="get_last_record"
| Datasource= "portdw">
| Select Max(ID) as maxnumber
| FROM dbo.media
|
| </CFQUERY>
| <cfoutput query="get_last_record">
| <CFSET maxnumber ="#maxnumber#">
|
| </CFOUTPUT>
| <!---  <cfmail to="[EMAIL PROTECTED]" from="[EMAIL PROTECTED]"
subject="A Document has been been added to the Media Library"
bcc="[EMAIL PROTECTED]">
| A new Document, #name# has been added to the Media Library "Pending" folder.
Please visit http://intraflir/portland/medialibrary/pending.cfm to publish the
document to the IntraFLIR Media library.
|
| Thanks,
|
| Neo
|
| </cfmail>
|    --->
| </cfif>  <cfelse></CFIF>
|
| </CFLOOP>
|
|
| 

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

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
                                

Reply via email to