@platypus Although it sounds easy there are a number of things that need to be place before you let anything loose on other users data!
My yet to be finished âDriveSwapâ program copies the database, initially I added a counter to the name but then replaced that with a Date/timestamp and the program makes the amendments to the database copy, i.e. no living database was/will be harmed in the execution of that program!
However, that program needs to be made stronger to take into account the â-shmâ andâ-walâ files, which indicate either that the database is currently in use or that the previous run of DxPL failed!
If any program uses the database the the database must be backed up and/or the copy of the database must be used.
If DOPs are going to be changed they must be secured to provide a way back for the user (and the developer) in the event of a problem.
Either use a DOPCopy feature that secures the whole directory of DOPs (and, optionally Images and xmp sidecar files) before undertaking any adjustments or make a backup copy of each DOP just before making the changes to the DOP.
The whole directory DOP copy has uses for backing up DOPs before âdestroyingâ them e.g. when installing a new release so that reversion to a previous state (release), alongside a previous database copy, is possible!? Once an update has been done on a new release then arguably there is no going back.
Going through the DOP line by line and locating and changing the appropriate line in this case is relatively easy but I am currently unsure if DxPL will recognise a DOP change from the âDate Modifiedâ attribute, the date in the DOP or âŚ?
If DxPL does not do a DOP read and then update the database there is a danger it will simply use the database entry and overwrite the DOP! That is something that can be tested using a basic manual âhackâ.
Currently I am learning PureBasic and (re-)discovering how careful you need to be when the data at risk isnât yours!
or apply a preset (full or partial) or âPaste correction settingsâ or return to being able to index a directory (of directories) and still be able to continue with normal editing on the Windows version!