Wiki
Clone wikimetadatarestore / Home
Meta Data Restore
Intro
This tool will allow you to restore the meta data of all files in a directory. Currently only the last modified date is restored.
Command
#!cmd java -jar restoremetadata.jar [directory] [file extensions :-seperated] [directories to exclude :-seperated]
e.g.
#!cmd java -jar restoremetadata.jar xml:java:html target:bin
will store and restore metdata for all files with extensions java,xml, html and will exclude directories with names target, bin
##Download
How it works
Every time the tool is ran on a directory it will list all files matching the given filters and calculate a hash for each file. It will then identify if a file with the same name and hash previously existed. If so the metadata that was previously saved for this file will be restored.
Usage
You could use the tool in combination with git for restoring the metadata of your files after doing a checkout or merge.
Make a post-checkout, post-commit, post-merge script in which you call the restoremetadata tool on you working directory.
Updated