Thanks Dave, your script is probably exactly what I need. And yes, I know it is common on Unix, but I'm working on Windows. Every once in a while I get frustrated by the differences :-)
Margaret -----Original Message----- From: Dave Watts [mailto:[EMAIL PROTECTED]] Sent: Friday, May 17, 2002 12:37 PM To: CF-Talk Subject: RE: Is there any way to "touch" a file and update its dateLastMod ified? > Is there any way to "touch" a file and update its > dateLastModified? There's a utility called "touch", which will do this. It's common on Unix/Linux systems, and it's part of the Cygwin distribution that you can use on Windows. I wouldn't be surprised if there were versions of touch available for Windows outside of Cygwin, either. > I'm trying to archive files after 5 days that are moved > over to the CF server for download but they are retaining > their dateLastModified from their original location. I've > checked the file properties in the OS and the date created > is the value I want because it shows when they were copied > into the folder. How do I access date created as opposed > to dateLastModified? Unfortunately, I don't think you can get that from CFDIRECTORY. If you're on Windows, you can access the COM interface to the filesystem: <cfscript> strFile = "d:\sample_file.txt"; fso = CreateObject("COM", "Scripting.FileSystemObject"); f = fso.GetFile(strFile); WriteOutput(DateFormat(f.DateCreated)); </cfscript> Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ______________________________________________________________________ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists