Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Creating a Calander that Queries a Folder

New Here ,
Apr 06, 2009 Apr 06, 2009

I'm trying to create a calander popup that will look into a folder (rather than a db) and retrieve a file created on that date. Is this possible? If so how (I'm a noob)?

TOPICS
Advanced techniques
350
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 07, 2009 Apr 07, 2009
LATEST

This is absolutely possible, but your question is a little too vague to give you specifics. You'll need to look into using the cffile tag to get the file off of disk. If we assume that your popup takes a date through the URL, and your files are formatted as "yyyy-mm-dd.txt" in a folder called "myfiles" at the sae level as your popup, then you could do something like this:

<cffile action="read" file="#ExpandPath("myfiles/#DateFormat(URL.myDate, "yyyy-mm-dd")#.txt" variable="myFileContent" />

Then, to output the content of the file:

<cfoutput>#myFileContent#</cfoutput>

You can find more information on the cffile tag here:

http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_f_02.html

Hope that helps,

Daniel Short

Adobe Community Expert

Message was edited by: Daniel Short. Added syntax highlighting.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources