You should create step by step:
- First list changes during a day ( OKM_ACTIVITY and events CREATE, DELETE, UPDATE, RENAME and MOVE ) and LegacyDAO class
https://github.com/openkm/document-mana ... cyDAO.java what helps you on doing the query from Java ( take a look at the method name executeQuery(String query) )
- When you have it it's almost done, simply you must execute the same steps into the file system in the same order
We will not doing the work for you, but we can guide on your code ( first must success on the first steps ) and when you got it going for the next ). If you share the code - incremental changes - we can review it, and suggets corrections etc..
Better than scripting in your case I suggest going for Crontab class
https://docs.openkm.com/kcenter/view/ok ... b-job.html
Also I suggest download our development environment
https://www.openkm.com/en/download.html