<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Getting a file&#8217;s timestamp using ColdFusion</title>
	<atom:link href="http://blog.stannard.net.au/2006/10/03/getting-a-files-timestamp-using-coldfusion/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.stannard.net.au/2006/10/03/getting-a-files-timestamp-using-coldfusion/</link>
	<description></description>
	<lastBuildDate>Sun, 08 Jan 2012 15:53:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: Angela Thompson</title>
		<link>http://blog.stannard.net.au/2006/10/03/getting-a-files-timestamp-using-coldfusion/comment-page-1/#comment-161</link>
		<dc:creator>Angela Thompson</dc:creator>
		<pubDate>Thu, 11 Mar 2010 21:44:50 +0000</pubDate>
		<guid isPermaLink="false">#comment-161</guid>
		<description>Hi Kevan,

It would seem that by using a web-form to upload the documents to the server, I screwed-up all the real &quot;modified&quot; dates.

So I thought that using the &quot;Created&quot; date (instead of modified) would be a second-best solution... However, I came across this thread (http://www.mail-archive.com/cfaussie@lists.daemon.com.au/msg21268.html). you read into a couple of the answers, it seems though this is not possible to grab the &quot;creation date&quot; without using a Windows COM object (which I can&#039;t use since we&#039;re running UNIX).

So I&#039;m not sure I&#039;ll be able to print-out actual creation dates, even though it seems like it would be a relatively simple task.

I&#039;ll update you if I do find a workaround.

Cheers,

Angela</description>
		<content:encoded><![CDATA[<p>Hi Kevan,</p>
<p>It would seem that by using a web-form to upload the documents to the server, I screwed-up all the real &quot;modified&quot; dates.</p>
<p>So I thought that using the &quot;Created&quot; date (instead of modified) would be a second-best solution&#8230; However, I came across this thread (<a href="http://www.mail-archive.com/cfaussie@lists.daemon.com.au/msg21268.html" rel="nofollow">http://www.mail-archive.com/cfaussie@lists.daemon.com.au/msg21268.html</a>). you read into a couple of the answers, it seems though this is not possible to grab the &quot;creation date&quot; without using a Windows COM object (which I can&#8217;t use since we&#8217;re running UNIX).</p>
<p>So I&#8217;m not sure I&#8217;ll be able to print-out actual creation dates, even though it seems like it would be a relatively simple task.</p>
<p>I&#8217;ll update you if I do find a workaround.</p>
<p>Cheers,</p>
<p>Angela</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevan Stannard</title>
		<link>http://blog.stannard.net.au/2006/10/03/getting-a-files-timestamp-using-coldfusion/comment-page-1/#comment-160</link>
		<dc:creator>Kevan Stannard</dc:creator>
		<pubDate>Thu, 11 Mar 2010 17:20:54 +0000</pubDate>
		<guid isPermaLink="false">#comment-160</guid>
		<description>Hi Angela, the modified date on the server should be the actual modified date. Are you seeing a different date in the file&#039;s properties window?</description>
		<content:encoded><![CDATA[<p>Hi Angela, the modified date on the server should be the actual modified date. Are you seeing a different date in the file&#8217;s properties window?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Angela Thompson</title>
		<link>http://blog.stannard.net.au/2006/10/03/getting-a-files-timestamp-using-coldfusion/comment-page-1/#comment-159</link>
		<dc:creator>Angela Thompson</dc:creator>
		<pubDate>Thu, 11 Mar 2010 16:22:29 +0000</pubDate>
		<guid isPermaLink="false">#comment-159</guid>
		<description>Thanks for this post - very helpful because it formats the date in a readable format, without the long numbers (unlike the other Java scripts that I found).

Is there a way of pulling the file&#039;s *actual* modified date? Not the modified date on the server, but the actual date it was modified? {For a MS-Word file, this is the info that appears when you click on File &gt; Properties &gt; Statistics.}

I built a web-based file system and want to print-out all the files in order of their actual modified date, so that I can let the managers of certain files know that their files are very out of date.

Is this possible? Thanks in advance!</description>
		<content:encoded><![CDATA[<p>Thanks for this post &#8211; very helpful because it formats the date in a readable format, without the long numbers (unlike the other Java scripts that I found).</p>
<p>Is there a way of pulling the file&#8217;s *actual* modified date? Not the modified date on the server, but the actual date it was modified? {For a MS-Word file, this is the info that appears when you click on File &gt; Properties &gt; Statistics.}</p>
<p>I built a web-based file system and want to print-out all the files in order of their actual modified date, so that I can let the managers of certain files know that their files are very out of date.</p>
<p>Is this possible? Thanks in advance!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevan Stannard</title>
		<link>http://blog.stannard.net.au/2006/10/03/getting-a-files-timestamp-using-coldfusion/comment-page-1/#comment-170</link>
		<dc:creator>Kevan Stannard</dc:creator>
		<pubDate>Thu, 09 Oct 2008 02:30:50 +0000</pubDate>
		<guid isPermaLink="false">#comment-170</guid>
		<description>You might be able to find a utility that lets you change the timestamp on a file. There may also be a couple of other options, depending on your setup.

One option might be to write a record to a database table with the current date/time and filename and use this to control which files should be deleted.  

Another option may be to copy each file into a subdirectory based on a UUID and use the timestamp on the directory instead.</description>
		<content:encoded><![CDATA[<p>You might be able to find a utility that lets you change the timestamp on a file. There may also be a couple of other options, depending on your setup.</p>
<p>One option might be to write a record to a database table with the current date/time and filename and use this to control which files should be deleted.  </p>
<p>Another option may be to copy each file into a subdirectory based on a UUID and use the timestamp on the directory instead.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://blog.stannard.net.au/2006/10/03/getting-a-files-timestamp-using-coldfusion/comment-page-1/#comment-169</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Wed, 08 Oct 2008 22:43:43 +0000</pubDate>
		<guid isPermaLink="false">#comment-169</guid>
		<description>This is great for reading a file&#039;s Last Modified date. Unfortunately, this value doesn&#039;t change when you copy a file. I have a situation (on a Windows 2003 server with CFMX 6.1) whereby I copy files to a temporary folder for users to retrieve. I want to read the Created date, or else possibly update the Modified date after a file is copied so that an automated task can look in the folder and delete files older than X minutes. The last modified date carries over from the original that is copied, so you don&#039;t have a true picture of how long the file has been in the temp directory. Is there a way to access the Created Date attribute of a file using java.util.Date (preferable)? Or a way to make a change to the last modified attribute after a file has been copied (less preferable)?</description>
		<content:encoded><![CDATA[<p>This is great for reading a file&#8217;s Last Modified date. Unfortunately, this value doesn&#8217;t change when you copy a file. I have a situation (on a Windows 2003 server with CFMX 6.1) whereby I copy files to a temporary folder for users to retrieve. I want to read the Created date, or else possibly update the Modified date after a file is copied so that an automated task can look in the folder and delete files older than X minutes. The last modified date carries over from the original that is copied, so you don&#8217;t have a true picture of how long the file has been in the temp directory. Is there a way to access the Created Date attribute of a file using java.util.Date (preferable)? Or a way to make a change to the last modified attribute after a file has been copied (less preferable)?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevan Stannard</title>
		<link>http://blog.stannard.net.au/2006/10/03/getting-a-files-timestamp-using-coldfusion/comment-page-1/#comment-167</link>
		<dc:creator>Kevan Stannard</dc:creator>
		<pubDate>Fri, 26 Sep 2008 13:33:47 +0000</pubDate>
		<guid isPermaLink="false">#comment-167</guid>
		<description>Rob, thanks for the update.</description>
		<content:encoded><![CDATA[<p>Rob, thanks for the update.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob</title>
		<link>http://blog.stannard.net.au/2006/10/03/getting-a-files-timestamp-using-coldfusion/comment-page-1/#comment-166</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Fri, 26 Sep 2008 06:10:04 +0000</pubDate>
		<guid isPermaLink="false">#comment-166</guid>
		<description>Ok I got it. The problem in the code for me was the usage of expandPath. This worked for me when I tweaked it:

&lt;cfset filePath = &quot;#GetCurrentTemplatePath()#&quot;&gt;
&lt;cfset fileObj = createObject(&quot;java&quot;,&quot;java.io.File&quot;).init(filePath)&gt;
&lt;cfset fileDate = createObject(&quot;java&quot;,&quot;java.util.Date&quot;).init(fileObj.lastModified())&gt;</description>
		<content:encoded><![CDATA[<p>Ok I got it. The problem in the code for me was the usage of expandPath. This worked for me when I tweaked it:</p>
<p>&lt;cfset filePath = &quot;#GetCurrentTemplatePath()#&quot;&gt;<br />
&lt;cfset fileObj = createObject(&quot;java&quot;,&quot;java.io.File&quot;).init(filePath)&gt;<br />
&lt;cfset fileDate = createObject(&quot;java&quot;,&quot;java.util.Date&quot;).init(fileObj.lastModified())&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob</title>
		<link>http://blog.stannard.net.au/2006/10/03/getting-a-files-timestamp-using-coldfusion/comment-page-1/#comment-165</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Fri, 26 Sep 2008 06:03:15 +0000</pubDate>
		<guid isPermaLink="false">#comment-165</guid>
		<description>I have run into the same 1969 problem as well. Clearly it&#039;s not calculating the date properly using this method, but I cannot find an alternative, nothing on HoF so far either. Those that got it to work right, did you do anything in addition to the posted code?</description>
		<content:encoded><![CDATA[<p>I have run into the same 1969 problem as well. Clearly it&#8217;s not calculating the date properly using this method, but I cannot find an alternative, nothing on HoF so far either. Those that got it to work right, did you do anything in addition to the posted code?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://blog.stannard.net.au/2006/10/03/getting-a-files-timestamp-using-coldfusion/comment-page-1/#comment-164</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Wed, 24 Sep 2008 06:27:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-164</guid>
		<description>Thanks. This simple feature was surprisingly hard to find. Even the few people who posted about the java.io.File class usually forgot to include mention java.util.Date, which is essential since CF generally doesn&#039;t know anything about Unix timestamps.</description>
		<content:encoded><![CDATA[<p>Thanks. This simple feature was surprisingly hard to find. Even the few people who posted about the java.io.File class usually forgot to include mention java.util.Date, which is essential since CF generally doesn&#8217;t know anything about Unix timestamps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevan Stannard</title>
		<link>http://blog.stannard.net.au/2006/10/03/getting-a-files-timestamp-using-coldfusion/comment-page-1/#comment-163</link>
		<dc:creator>Kevan Stannard</dc:creator>
		<pubDate>Sun, 21 Sep 2008 03:34:35 +0000</pubDate>
		<guid isPermaLink="false">#comment-163</guid>
		<description>Not sure what may be happening there. You might like to post a message to CF-Talk ( http://www.houseoffusion.com/groups/cf-talk ) and see if anyone has some thoughts.</description>
		<content:encoded><![CDATA[<p>Not sure what may be happening there. You might like to post a message to CF-Talk ( <a href="http://www.houseoffusion.com/groups/cf-talk" rel="nofollow">http://www.houseoffusion.com/groups/cf-talk</a> ) and see if anyone has some thoughts.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

