Geoff,
I haven't played much with the upload part of cffile, but the way that
I get the LastModified date is use the cfdirectory tag and in the filter
use just the name of the file.
maybe:
<cfdirectory name="qryGetLastDateMod" filter="#CFFILE.serverFile#"
directory="#CFFILE.serverDirectory#">
StructInsert(fileStruct, "TimeLastModified",
"#qryGetLastDateMod.DateLastModified#")
(The Last modified date variable is slightly different than the cfffiles)
HTH,
Tim P.
----- Original Message -----
From: "Geoff Hoffman" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, March 26, 2001 3:06 PM
Subject: I need to know the moddate
> I can't find any way in CF to getFileInfo(aFilePathOnServer) - for
> things like the moddate and filesize, so I was going to use the CFFILE.
> TimeLastModified property instead...
>
> Now I am having some issues with CFFILE.TimeLastModified and was
> hoping for a little help from all you GURUs.
>
> First of all, I have 4 form fields (e.g. <input type="file">) on
> the same page for the user to upload up to 4 jpegs.
>
> Here are the assumptions I am working under:
>
> 1) The CFFILE variables (page 22 of quick ref) are only available
> right after I upload the file, for the next one they get overwritten.
> .
>
> 2) So I have a bunch of code that parses the CFFILE action=upload
> variables into a STRUCT, word for word the same as the file action=upload
> attributes, so after I upload the file, I now have a struct which
> is storing the file upload attributes. If you're interested, here's
> the code...
>
> <!--- this parses the uploaded file's variables so they can be stored
> while the next file is uploaded. --->
>
> <cfscript>
> fileStruct=StructNew();
> StructInsert(fileStruct, "AttemptedServerFile",
"#CFFILE.AttemptedServerFile#");
>
> StructInsert(fileStruct, "ClientDirectory", "#CFFILE.ClientDirectory#");
> StructInsert(fileStruct, "ClientFile", "#CFFILE.ClientFile#");
> StructInsert(fileStruct, "ClientFileExt", "#CFFILE.ClientFileExt#");
> StructInsert(fileStruct, "ClientFileName", "#CFFILE.ClientFileName#");
> StructInsert(fileStruct, "ContentSubType", "#CFFILE.ContentSubType#");
> StructInsert(fileStruct, "ContentType", "#CFFILE.ContentType#");
> StructInsert(fileStruct, "DateLastAccessed", "#CFFILE.DateLastAccessed#");
>
> StructInsert(fileStruct, "FileExisted", "#CFFILE.FileExisted#");
> StructInsert(fileStruct, "FileSize", "#CFFILE.FileSize#");
> StructInsert(fileStruct, "FileWasAppended", "#CFFILE.FileWasAppended#");
> StructInsert(fileStruct, "FileWasOverwritten",
"#CFFILE.FileWasOverwritten#");
>
> StructInsert(fileStruct, "FileWasSaved", "#CFFILE.FileWasSaved#");
> StructInsert(fileStruct, "OldFileSize", "#CFFILE.OldFileSize#");
> StructInsert(fileStruct, "ServerDirectory", "#CFFILE.serverDirectory#");
> StructInsert(fileStruct, "ServerFile", "#CFFILE.serverFile#");
> StructInsert(fileStruct, "ServerFileExt", "#CFFILE.ServerFileExt#");
> StructInsert(fileStruct, "ServerFileName", "#CFFILE.ServerFileName#");
> StructInsert(fileStruct, "TimeCreated", "#CFFILE.TimeCreated#");
> StructInsert(fileStruct, "TimeLastModified", "#CFFILE.TimeLastModified#");
>
> </cfscript>
>
>
> 3) When I try to output the uploadedFile.TimeLastModified attribute,
> it's an empty string... and it has nothing to do with the struct,
> it's empty even if you <cfoutput>#CFFILE.TimeLastModified#</cfoutput>
>
> 4) So I am left here still wondering, how do I get a file's moddate????
>
> 5) I already tried unquoted attribute names, to no avail.
>
> 6) I already tried #CreateDateTime( CFFILE.TimeLastModified )# the
> problem is still that .TimeLastModified EQ ""
>
>
> TIA for your very valuable assistance in this very important matter.
>
> Geoff Hoffman
> [EMAIL PROTECTED]
>
>
>
>
>
>
>
> Archives: http://www.mail-archive.com/[email protected]/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists