cancel
Showing results for 
Search instead for 
Did you mean: 

How to keep original file creation date

marc1911
Champ in-the-making
Champ in-the-making
Hi there,

When I upload a Word document through the Webclient- or CIFS interface, the original creation date of my file changes automatically to the date of today. This is not what I anticipated. Is there any way to keep the original file date when (bulk) uploading? I need to upload financial documents from last year. If I continue the process it looks that all these documents are from july 2007 and this is really not what we want.

Regards,

Marc
54 REPLIES 54

derek
Star Contributor
Star Contributor
You can extend the action to provide the features you need.

derek
Star Contributor
Star Contributor
maybe it works..

but i need correct date/time.. for ALL my files  (all types.., let's say some files are office, but other are images, mp3s, and so on…), zip, rar, exe .., etc.
so i need to keep dates and times for all types of files, not just office files (doc, xls..) ..

The metadata extractors is not the solution here; they can only pull out data that is present in the actual binary data.  Most file types do contain the information, but it's not equivalent to the file system time.  If you want the file system time, your upload process needs to pick that up and set the value explicitly.  You should probably add an aspect with an extra date property to populate - this will prevent the extracted time from getting confused with the original file system time.  Naturally, getting the file system time into Alfresco is an issue for whatever client is being used to upload the document.

Regards

gem45
Champ in-the-making
Champ in-the-making
Generally, the system file time into Alfresco will always be the issue for what client that is being used in uploading the document.


Dossier de surendettement

razibur
Champ in-the-making
Champ in-the-making
There are 2 different date/times.  One is date taken, and that can not be changed.  The other is date modified and that will change when you edit photo.  Does this fit with what you are seeing?



You can choose to show them or not in the metadata fields.


Mengembalikan Jati Diri Bangsa|
Kenali Dan Kunjungi Objek Wisata Di Pandeglang

drfthiel
Champ in-the-making
Champ in-the-making
I have downloaded V3.2 recently and I do have the same requirement regarding the original file date(s). Is there a streamlined procedure for 3.2? I got completely lost when I read the existing posts. Is there an updated hands-on document?

carry2web
Champ in-the-making
Champ in-the-making
Wouldn't a content rule and an action that overwrites the creation date be much more usefull than hacking in XML extensions?

invictus9
Champ in-the-making
Champ in-the-making
I don't know if the other repliers to this thread are being intentionally dense, or simply not understanding the issue that the original poster has.

The issue is that Alfresco stores the WRONG creation date. At least according to the requirements of the poster.

The responses have said that it is possible to get the RIGHT (for some definition of "right") creation date by modifying the extractors. They didn't say what to modify them to.

The answer is that, by default, metadata extractor tools are conservative in taking the data that they extract and putting them in the properties when those properties already have values. Mostly, they won't change anything that already has something set. The original poster needs to tell the extractor to override any properties with metadata that it extracts.

Read the documentation in http://wiki.alfresco.com/wiki/Metadata_Extraction and the subsection for Overwrite Policies to see how to do this.

softbless
Champ in-the-making
Champ in-the-making
The answer is that, by default, metadata extractor tools are conservative in taking the data that they extract and putting them in the properties when those properties already have values. Mostly, they won't change anything that already has something set. The original poster needs to tell the extractor to override any properties with metadata that it extracts.

Read the documentation in http://wiki.alfresco.com/wiki/Metadata_Extraction and the subsection for Overwrite Policies to see how to do this.

Hi Invictus,

Could you give me some hints regarding this? We spend some hours to fix this issue. But it's not working.

These are the steps that we did :

# Step 1: We edit content-services-context.xml
we add this code to basemetadataextracter, HTML, Office, PDF, and Open Office :
<property name="inheritDefaultMapping">
            <value>true</value>
         </property>
         <property name="overwritePolicy">
            <value>EAGER</value>
         </property>
         <property name="mappingProperties">
            <props>
               
               <prop key="creationDate">cm:created</prop>
               
            </props>

the complete file is here : http://www.softbless.com/content-services-context.xml

# Step 2 : I login as Admin, In "Data Dictionary" Folder, I create Rule with condition "All Items" and action : "Extract common metadata fields from content " Type : "Inbound"

# Step 3: I restart the server.

# Step 4 : I login to Alfresco, go to Folder "Data Dictionary" and choose "Reapply Rules in Space and Children"

# Step 5 : I upload some files types through Alfresco web : *.doc *.odt *.pdf *.jpg *.html but the creation date is still the date when we upload the contents to Alfresco. Then I tried to upload again through CIFS, but the creation date is still not the original date.

We have read these 4 pages of this posting over and over, do we miss any steps to do? Please kindly help…  Smiley Happy

invictus9
Champ in-the-making
Champ in-the-making
Softbless:

You are now out of my league. I have been browsing documentation but am not actually using the extractors. The possibilities are:

1) the documentation is wrong or incomplete. I've seen a lot of that, so I wouldn't be the least surprised. To find the correct behavior, for some definition of correct, you would have to look at the source code.

2) the metadata is not correct or is not extracted correctly. Where are you getting the creation date metadata from? Does the document contain it as a property? How do you know the metadata extractor is getting the correct (original) creation date?

I feel your pain. You have highlighted a poor business decision on the part of Alfresco. The date that a document was copied to the Alfresco server is not an "interesting" date from a business point of view. We likely will have to do some back and fill with our institution as well, explaining that we lose important information when the file goes on to the Alfresco server.

invictus9
Champ in-the-making
Champ in-the-making
maybe it works..

but i need correct date/time.. for ALL my files  (all types.., let's say some files are office, but other are images, mp3s, and so on…), zip, rar, exe .., etc.
so i need to keep dates and times for all types of files, not just office files (doc, xls..) ..

You likely won't be able to do this for file formats that do not have the metadata attached to them: Office documents have properties, and Adobe documents have properties (XMP), and ZIP files have properties. The other types have metadata that are kept by the file system itself, and is lost when moved from one file system to another. The application/operating system that does the copy may choose or be able to set the date/time in some circumstances.

Another approach that you might take is to store the data from a remote program, using WSDL, that gets the metadata from the originating file system and sets the information remotely.