Preserving "Date Created" "Date Modified" when converting a file?

I had a great experience using MP3tag and now I find myself in with a project that has a similar workflow, but with doc and docx files.

I need to convert a bunch of MS Word doc files to docx in order to make them searchable. This is a Windows server of over 500,000 indexed files, but the search isn't reading the content of the word files. The solution I've come up with is to convert them all to docx. Unfortunately, when I do this, it will erase the "date created" and "date modified" data and I need these to remain unchanged as the amount of data goes back 30+ years of a company's life and that chronology is very important.

I feel like this is a problem I could have managed pretty easily in Mp3tag. I would just...

  • copy all the files
  • convert these new files them to the new format
  • copy the metadata from the old files to the new files

Has anyone out there faced a similar issue? Can you point me in the right direction, please?

Thanks!

MP3tag would not have copied the OS properties like creation date and modification date over to a new file. But this is not the point.

I would look for "touch", a utitlity to set various file date properties.
Then I would get the old time data from all the files including the unique filename, and use that to create a batch file that calls the "touch" utility with the appropriate parameters.

... but before you transform

wouldn't it be better to get a search program that can deal with the existing file format?

Maybe something like this

can help you.

I don't use this software, please test it carefully on a small subset of your converted *.docx files.

Yeah, this is also how one would typically do it.

A while back a user from here, JJ Johnson, informed of an open source touch version for Windows that supports transferring date creation timestamps (which the original Linux version it was ported from doesn't).

That version is since only available via archive.org, from this page (direct zip download).

The syntax for that version of touch, using a reference file for the source timestamps to apply to a target file, along with copying all timestamps is as follows:

touch -a -m -x -r <reference file> <target file to change>

-a = access timestamp
-m = date modified timestamp
-x = date created timestamp
-r <file> = use reference file

Keep in mind you'll have to account for/escape any special characters in the paths if batch can't handle them as-is (double quoting the paths alleviates most issues though).

This also looks promising, assuming it handles date creation timestamps and any special characters.