Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default finding extension

    How do you find an extension (either doc or pdf) of a file by querying a
    database that gives you the ID of the record when you don't know which
    extension it is? I know how to get this info when uploading a file, but I want
    to get this info when checking my records on a cfm page. Is it possible to get
    whatever follows the period on my link below:

    <cfquery name='qproject...'

    <cfoutput query='qproject'
    <a href="/webservices/publication/samples/#pubID#.">)SAMPLE OF PROJECT</a>
    </cfoutput>

    So the URL above would either
    http:[url]www.mydomain.com/webservices/publication/samples/40.(pdf[/url] or 40.doc)

    Thanks,

    Hoz

    hoz Guest

  2. Similar Questions and Discussions

    1. DM6.0 Extension Manager v1.2.107 not d/l newer extension
      Hi Folks, I have not been on line due to back surgery and recovery (ouch, yes it still hurts) I have tried to down load some newer navigation aids...
    2. Help finding Event Calendar Extension
      I am looking for event calendar extensions? Does anyone know were I can find some besides here at Adobe? Any help would be great (I am looking for...
    3. Finding relative size of each extension in the PHP core
      Hello, Is there any easy way to find out approximately the size for each PHP extension compiled into a build (libphp4.so, for example), without...
    4. Is .dcr extension = Director file extension ?
      I'm a newbie and saw some files on a website ending in .dcr... 1 - Is the .dcr file type a Macromedia Director file? 2 - Does it take the...
    5. OT: Finding a job
      Hi group, Looking for a job. I'm at the point where I will go to a place and say, "Look, I'll give you $500 or half of my first week's salary,...
  3. #2

    Default Re: finding extension

    If your table does not store the filename for some reason, you could probably
    use the FileExists() function to determine which file extention to display. If
    the file "40.pdf" exists in the target directory, show a link for that file,
    etc...


    mxstu Guest

  4. #3

    Default Re: finding extension

    That works. Thanks!
    hoz Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139