if the file doesn't exist.

<cfif isDefined("getFiles.name") and len(getFiles.name) and
(listLen(valueList(getfiles.name)) gte 1)>

Show the file, its here.

<cfelse>

The file isnt here, but here's the file that should be here.

</cfif>

but he said he did know the name of what "Should" be there, just had to
know if it wasn't...so he could
compare with what "should" be there.

I think.  I was confused the first time I read it.

....tony

Tony Weeg
sr. web applications architect
navtrak, inc.
[EMAIL PROTECTED]
410.548.2337
www.navtrak.net

-----Original Message-----
From: Matthew Walker [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 18, 2004 12:35 AM
To: CF-Talk
Subject: RE: using the result of CFDIRECTORY as a list

How could a file not have a name?

  _____  

From: Tony Weeg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 18 May 2004 4:30 p.m.
To: CF-Talk
Subject: RE: using the result of CFDIRECTORY as a list

<cfdirectory
  action = "">   directory = "c:\inetpub\wwwroot\RMG\events"
  name = "getFiles"
  filter = "_#date#-#id#*.cfm"
  sort = "name"
  >
  
  <cfset mylist = valueList(getFiles.name)>
  <cfdump var="#myList#">

now, this doesn't check for a null value in getFiles.name, but you could
accomplish that with...

<cfif isDefined("getFiles.name") and len(getFiles.name)>

...

</cfif>

ur welcome

...lettuce and tomato :)

Tony Weeg
sr. web applications architect
navtrak, inc.
[EMAIL PROTECTED]
410.548.2337
www.navtrak.net

-----Original Message-----
From: mayo [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 18, 2004 12:21 AM
To: CF-Talk
Subject: RE: using the result of CFDIRECTORY as a list

The cfdirectory is below:

<cfdirectory
  action = "">   directory = "c:\inetpub\wwwroot\RMG\events"
  name = "getFiles"
  filter = "_#date#-#id#*.cfm"
  sort = "name"
  >

If I do a #ListLen(eventFiles)#

I get the complex object type error.

An abbreviated cfdump is below:

     ATTRIBUTES DATELASTMODIFIED MODE NAME SIZE TYPE
      1 [empty string]  05/17/2004 07:12:11 PM  [empty string]
_2004-44-brochure.cfm  79  File

Gil

  -----Original Message-----
  From: Tony Weeg [mailto:[EMAIL PROTECTED]
  Sent: Monday, May 17, 2004 11:09 PM
  To: CF-Talk
  Subject: RE: using the result of CFDIRECTORY as a list

  what happens if you cfdump the results, doesnt it look like a query?

  can you valueList() the getDirectory_QueryName.fileName

  or whatever the variable is called to get a list?

  ....tony

  Tony Weeg
  sr. web applications architect
  navtrak, inc.
  [EMAIL PROTECTED]
  410.548.2337
  www.navtrak.net

  -----Original Message-----
  From: mayo [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, May 18, 2004 12:06 AM
  To: CF-Talk
  Subject: using the result of CFDIRECTORY as a list

  I'm using CFDIRECTORY to get a list of files that meet certain
  parameters.

  Sometimes one of the file doesn't exist. And here's the trouble. I
can't
  seem to use CFDIRECTORY as a list. I keep getting the "complex object
  type" error.

  I can produce a list of a files that should exist, I would like to
  compare that to the files that do exist.

  Been spinning my wheels on this one.

  Gil Midonnet

  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to