Preserve file modification time when updating internal links

Use case or problem

I’d like to keep the modification time of files unchanged when Obsidian updates internal links after renaming a file (or heading/block). I value creation & modification time of files as they give me contextual information of what knowledge I had and what stage I was in when I was editing the note. Right now, upon renaming a file, all the linked files will be updated with a new modification time, which totally make sense to me, as the text content of file is change. However, for me, from the aspect of knowledge management, the substantial content of the files are not changed. So it would be great to have an option to keep file modification times upon updating links.

Proposed solution

I’m not very familiar with the technical stuff, but maybe it is possible to save the modification times of the to-be-updated files, then update the links in the files (then sync if needed), then revert to the old modification times?

Current workaround

The current workaround is to manually keep a modification time in each note and update it upon substantial content change. But I don’t do it because it’s too cumbersome.

2 Likes

hi,
i know this one is quite old and i saw some other topics (ex : Is it possible to change the creation date of a note? that is closed)
i also need to control what happens on ctime and mtime.

mtime : update of yaml, properties, tags, internal links. it’s only to keep consistency of my obsidian DB, not about the content. that is my need.

ctime : upload then download files in/out some (all?) content management systems (cloud or not) may introduce some flaws (ctime == download time and not file creation date)

i know that a lot will answer that i should use yaml.
some plugins have this behavior, write method supports that.

here are my questions :
is there a plugin to retrofit old files to add ctime, mtime properties? one by one, based on a list, all in a folder or vault.
i think a setup to tell “i want to keep mtime for a while” while i retrofit my database would be useful.
another setup to keep mtime when automatic update of links.

happy to discuss further.