Skip to main content
Participating Frequently
January 27, 2009
Question

CF to create links for files within a folder?

  • January 27, 2009
  • 1 reply
  • 407 views
I've begun using the CFdirectory tag to list the contents of Costumers' folders on their sites, but I was wondering if there was a way to turn them into links so that others can download the files?
    This topic has been closed for replies.

    1 reply

    Inspiring
    January 27, 2009
    rod_lethal wrote:
    > I've begun using the CFdirectory tag to list the contents of Costumers' folders on their sites, but I was wondering if there was a way to turn them into links so that others can download the files?

    Yes. You just have to recognize the difference between a file path,
    such as "c:\\something\somethingElse\costumers\" and an URL path such as
    "www.myWebSite.com\somethingElse\costumers\".

    Once you have these two views in mind it is pretty straight forward to
    loop over a list of one format and create valid links in the other format.
    Participating Frequently
    January 27, 2009
    Any chance I can get a sample of the code???
    I'm a bit of a noob