From QlikView November 2018 SR 1 and up, a new Shared File Cleaning option was introduced, which allows for bookmarks to be removed based on their last modified time. This works for both .shared files and .tshared files.
This will will remove all bookmarks whose LastModified time is earlier than 1 day ago.
Parameter breakdown:
`-x` : run in Shared File Cleaning Mode
`-p` : purge Mode, will write result into new file
`-BM:max_days 1` : remove all bookmarks which hasn't been modified since 1 day ago in Purge Mode;
`-skchID` : skip checking Shared Objects' Id format (for backwards compatibility)
`-f orig` : save result using original Shared File format (.Shared). `-f same` will keep same format as input; `-f tx` will save as '.TShared' format.
`-BM:LastRecallDays [TimeoutDays]` : newly added parameter, remove bookmarks which haven't been recalled for [TimeoutDays]
`LastModifyDays` : is same as `max_days` last time, just changed to clearer name;
here is an example:
-x "test.QVW.Shared" -p -BM:LastModifyDays 90 -BM:LastRecallDays 30 -skchID -f same
Add a new parameter `-BM:FilterMode [and|or|xor]` to control bookmarks filter connection mode, if not specified `OR` is set by default;
an example is: -x "C:\ProgramData\QlikTech\SERVERSIDEEXPORT.QVW.TShared" -p -BM:LastModifyDays 100 -BM:LastRecallDays 1 -BM:FilterMode AND -skchID -f tx
Logs for the cleaning tool can be find as `CleanTool*.log` besides EventLog under Server's log folder (like "C:\ProgramData\QlikTech\QlikViewServer\CleaningTool_AUSYD-JZS1.log")