Solved

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

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

Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

Question has a verified solution.

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

Suggested Solutions

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…
In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

756 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