Solved

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

Posted on 2001-06-12
2
195 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 50 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

695 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