Solved

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

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
URL redirect 4 56
Help Fix A 403 error 13 107
Configure IIS to process JSON 10 80
cookies analysis tools 2 91
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 …
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

786 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