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

peterh_nl
Champ in-the-making
Champ in-the-making
yes, and if solved/concluded, maybe make the topic sticky, I suspect this to be a pretty common 'problem' (keeping the date right..) and a good thread for study!
cheers,
Peter

hkusulja
Champ in-the-making
Champ in-the-making
sorry, i don't see where is solution..

i also have same problem, and i have posted a post: http://forums.alfresco.com/viewtopic.php?f=7&t=3552&p=37748#p37748

so if somebody know how can keep my original file dates/times when i move a file to alfresco through samba/cifs..

rjackson
Champ in-the-making
Champ in-the-making
Essentially I was too lazy to follow the post all the way, that was until I realized it wasn't as complicated as it sounded. Plus there were some gripes about this not working, so I assumed it didn't work.

However, I was able to get this to work following exactly what was done here on this post. By first creating the extractor.xml for the type of files (office in my case so I just copied the example posted on page 2) , then by creating a rule for extraction of meta data in the directory that I was to post my files to. I restarted alfresco, and away I went . No problems to report yet, but the first file I sent via CIFS and it kept it's original date!

hkusulja
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..) ..

rjackson
Champ in-the-making
Champ in-the-making
Hint: It's time to read the javadocs for the extractors.  You'll see which extractors handle the different mimetypes and which properties they pull out.  So you're using an odt document.  You're overriding the incorrect extractor for that.

Regards


mimetypes - i.e. xml, mp3's etc.

rjackson
Champ in-the-making
Champ in-the-making
So After playing around with it for a while - I too am only able to get this to work if the rule is local to each subspace.

I'm only able to get it to work of office docs for some reason. I cant find the information on the java docs that pertain to the keys of documents other than office. It seems incomplete somehow, or its a default "key" that  isn't listed on the individual mime types.

If someone could chime in as to what can be done about mime types that are not listed here I would be very happy. For example where do I start to look if I'm dealing with a indd. mime type.

Is there any way to make a catch-all? It would be really nice if I could make this the default behavior for all documents.

dinger
Champ in-the-making
Champ in-the-making
You can't currently have a catch all.

You could write a custom extractor that did it for all files.

As mentioned before you can only enable it for specific file types that already have extractors.

Rob

rjackson
Champ in-the-making
Champ in-the-making
For anyone stumbling upon this I did find a project that I think will handle all adobe files, which is specifically what I need)

http://forge.alfresco.com/projects/xmp/

petr_hollay
Champ in-the-making
Champ in-the-making
Hi,

This is what I want to happen:
When files (let's just limit it to MS Office files for now) are uploaded into the system, they populate with the original creation date/time of the file, not the upload date/time.

And this is exactly how this works, but: there is a bug in Alfresco which prevents the dates from Office documents to be overtaken, see http://issues.alfresco.com/browse/ALFCOM-1302
Even if you set a space rule for the incoming documents, all other properties from the e.g. Word document are being saved, just the dates are ignored.

Note: The "Upload document" wizzard in WebClient doesn't set those dates anyway: the data are being extracted but not set to the new Alfresco document.

When using a space rule, you need to set
<property name="overwritePolicy" value="EAGER" />
either for the extracter you want to use (e.g. "extracter.Office" bean) or for all extracters ("baseMetadataExtracter" bean), all in content-services-context.xml.

Hope this helps,
Petr

harishns
Champ in-the-making
Champ in-the-making
Hi,
I am facing one issue while importing of the zip file.
I have set a rule to import zip file in to one space and found zip file extracted properly for the first time, after that I have added few more files to that zip and want to update the zip file, if I do that through UI, the zip file is not extracting, application is throwing following error

[org.alfresco.web.ui.common.Utils] Failed to run Actions due to error: 08080003 Failed to process ZIP file.
org.alfresco.error.AlfrescoRuntimeException: 08080003 Failed to process ZIP file.
   at org.alfresco.repo.action.executer.ImporterActionExecuter.importDirectory(ImporterActionExecuter.java:310)
   at org.alfresco.repo.action.executer.ImporterActionExecuter.executeImpl(ImporterActionExecuter.java:221)
   at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:127)
   at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:711)
   at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:648)
   at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:510)
                   …

   at java.lang.Thread.run(Thread.java:595)
Caused by: org.alfresco.service.cmr.model.FileExistsException: Existing file or folder testfolder already exists
   at org.alfresco.repo.model.filefolder.FileFolderServiceImpl.createImpl(FileFolderServiceImpl.java:786)
   at org.alfresco.repo.model.filefolder.FileFolderServiceImpl.create(FileFolderServiceImpl.java:735)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)

I am not able to get any replacing/updating flag to that action and in code it is calling NodeService.createNode() which is throwing DuplicateChildNameException . In java also I am not finding any flag to replace or update the existing files/folders
is there any alternatives to update existing file while extracting zip?

Any help will greatly appreciated

Harish