Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

What's the simplest way of obtaining/displaying a file's date of creation?

Posted on 2001-06-12
2
Medium Priority
?
206 Views
Last Modified: 2013-12-24
Is there any way of reading/displaying a file's date of creation and/or date of uploading onto the server?
I realise there's the variable file.timecreated which is part of the <CFFILE> tag but I don't want to alter the file!  So is there any simple way of using the variable or accessing this information in some other way without altering my file?

Thanks in advance!
0
Comment
Question by:Tamalaine
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
CF_Spike earned 200 total points
ID: 6181943
You can access the last modified date using the following:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
     <title>File Date</title>
</head>

<body>
<CFDIRECTORY ACTION="LIST"
        DIRECTORY="F:\sites\tests\wwwroot\CFFILE\"
        Name="thisdir">
<CFSET FileList = ValueList(thisdir.name)>
<CFSET DateList = ValueList(thisdir.datelastmodified)>
<CFSET FileToCheck = "index.cfm">
<CFSET FilePosition = ListFind(FileList,FileToCheck)>
<CFSET lastModifiedDate = ListGetAt(DateList,FilePosition)>
<CFSET TimeStamp = ParseDateTime(lastModifiedDate)>

<CFOUTPUT>
#TimeStamp#
</CFOUTPUT>


</body>
</html>

Spike
0
 

Author Comment

by:Tamalaine
ID: 6182123
Perfect!  Many thanks.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question