#menotti.sql# #dirllist# the application dont show the conent of the carpet the other problem is that i only want that the application recognize the number 101, or 201 or any number that i have in the file using the id, so i dont have to put [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => menotti08 [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 5 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> listing a Directory files - Coldfusion - Getting Started

listing a Directory files - Coldfusion - Getting Started

hello community i want to make a directory list i have pdf doents in a list 101_4326.pdf 101_4325.pdf 201_4324.pdf 201_4328.pdf but i only want to show the pdf that have the same number that the client example: id_client = 101 and the pdf is 101_4326.pdf how can i show the files and associate the files with the id?...

  1. #1

    Default listing a Directory files

    hello community
    i want to make a directory list
    i have pdf doents in a list
    101_4326.pdf
    101_4325.pdf
    201_4324.pdf
    201_4328.pdf
    but i only want to show the pdf that have the same number that the client
    example: id_client = 101 and the pdf is
    101_4326.pdf how can i show the files and associate the files with the id?

    menotti08 Guest

  2. #2

    Default Re: listing a Directory files

    menotti08 wrote:
    > hello community
    > i want to make a directory list
    > i have pdf doents in a list
    > 101_4326.pdf
    > 101_4325.pdf
    > 201_4324.pdf
    > 201_4328.pdf
    > but i only want to show the pdf that have the same number that the client
    > example: id_client = 101 and the pdf is
    > 101_4326.pdf how can i show the files and associate the files with the id?
    >
    You can probably use the filter function to do that (I'd have to
    experiment to be sure):
    [url]http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-a20.htm#wp1097918[/url]

    I would think the filter could be something like #clientid#*

    If not, cfdirectory returns a query object and you could run a query of
    that query to filter.

    Matt
    --
    Matt Woodward
    [email]mpwoodward[/email]
    Team Macromedia - ColdFusion
    mpwoodward *TMM* Guest

  3. #3

    Default Re: listing a Directory files

    Try this:

    <cfset id_client = "101">
    <cfdirectory action="list" name="Qdir"
    directory="C:\directory_path_to_pdf_files">
    <cfquery dbtype="query" name="listfiles">
    SELECT Name
    FROM Qdir
    WHERE (Name LIKE '#id_client#%')
    </cfquery>
    <cfdump var="#listfiles#">




    Abinidi Guest

  4. #4

    Default Re: listing a Directory files

    iu think this can help me thx
    but i have to test it first
    thx for your help
    i will mark this when i test it

    sorry for my english
    menotti08 Guest

  5. #5

    Default Re: listing a Directory files

    ok i have problems with this
    <cfset DirList = "C:\Inetpub\wwwroot\test\pdf">

    <cfset id_client = "101">
    <cfdirectory action="list" name="Qdir" directory="DirList">
    <cfquery dbtype="query" name="listfiles" result="menotti">
    SELECT 101
    FROM Qdir
    <!--- WHERE (Name LIKE '#id_client#%') --->
    </cfquery>
    <cfoutput>#menotti.sql#</cfoutput>
    <cfdump var="#listfiles#">
    <cfoutput query="listfiles">#dirllist#</cfoutput>

    the application dont show the conent of the carpet
    the other problem is that i only want
    that the application recognize the number 101, or 201 or any number that i
    have in the file using the id, so i dont have to put <cfset id_client = "101">



    menotti08 Guest

  6. #6

    Default Re: listing a Directory files

    There are a few things wrong with what you have.
    If you use a variable in the CFDIRECTORY to define the path, you have to wrap
    it in #.
    Your WHERE clause, commented out, is correct. Remove the comments.
    Remove the RESULTS attribute in the CFQUERY. ColdFusion (at least version 5)
    does not recognize this.
    Change the way you are displaying your results. I have shown a CFOUTPUT loop
    of the filename.
    I removed the CFDUMP and the CFOUTPUT loop at the end of your code.


    <cfset DirList = "C:\Inetpub\wwwroot\test\pdf">

    <cfset id_client = "101">
    <cfdirectory action="list" name="Qdir" directory="#DirList#">
    <cfquery dbtype="query" name="listfiles">
    SELECT 101
    FROM Qdir
    WHERE (Name LIKE '#id_client#%')
    </cfquery>
    <cfoutput>#name#<BR></cfoutput>

    jdeline Guest

Similar Threads

  1. Directory Listing Denied
    By kylin in forum Macromedia Dynamic HTML
    Replies: 7
    Last Post: February 11th, 05:36 PM
  2. Directory listing
    By Matthias Wulkow in forum Dreamweaver AppDev
    Replies: 1
    Last Post: March 3rd, 07:46 AM
  3. retrieving directory listing
    By solid_state in forum Macromedia Flash
    Replies: 3
    Last Post: December 16th, 01:59 PM
  4. [PHP] directory listing
    By Marek Kilimajer in forum PHP Development
    Replies: 0
    Last Post: August 19th, 10:56 AM
  5. CD Directory Listing
    By James Hobart in forum Macromedia Director Lingo
    Replies: 2
    Last Post: July 18th, 01:07 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •