#770

The program does not delete old orders by itself. The working folder grows, so once every few months it is worth unloading it. There are two different levers: the depth of the selection from the server and the cleanup of what is already on the disk.

The depth of the selection: the time.txt file

This file holds one whole number — for how many of the last days to ask the server for orders. There must be nothing in the file except the number.

  • The default value is 60. The same one is used if the file is missing or does not contain a number: the program will write about it in the log and keep working.
  • Orders that have not changed for longer than the stated period simply will not be returned by the server — which means the program will not download them either.
  • The file is edited by hand, the program does not write into it. The path to it is set in the settings, by default it is time.txt next to the program.

It makes sense to reduce the value if every cycle sorts through too many old orders. This does not affect the already downloaded files — they stay on the disk.

Cleaning the disk: the «Cleanup» button

The button on the «Home» tab looks for order files that are not in the program database — usually these are leftovers from previous installations or orders erased from the database. The procedure is as follows:

  1. The program walks the working folder and collects the «ownerless» folders.
  2. It shows the list with checkboxes — you can see the path and how many files are in it.
  3. Only what is ticked is deleted.

The folders of orders that are in the database do not get into the list. A shared folder (with labels, for example) will not be offered for deletion as long as it contains at least one known order.

Protection against an empty database

If there is not a single order in the program database, the cleanup does nothing. This is done deliberately: on a new installation or after a database reset it would otherwise wipe out all the order files at all.

What the cleanup cannot do

  • delete by file age («everything older than 30 days»);
  • make a backup copy before deleting;
  • roll a deletion back.

What has been deleted is not recovered — if needed, the orders are downloaded from the server again.

Cleaning on the machine side

The cleanup works only with the working folder. The destination folders the files went to are sorted out in the «Folder comparison» window — there you can see what is where, and you can delete selectively.

If a line about orders that are not in the database has appeared in the log, that is exactly the reason to press «Cleanup».