View Single Post
Old 07-20-2021, 03:15 AM   #38
Phazma
Human being with feelings
 
Join Date: Jun 2019
Posts: 2,872
Default

Quote:
Originally Posted by amagalma View Post
To whom may find it useful:

Keep x number of most recent timestamped backups of current project file (deletes older ones - no undo!)

Scans the current project directory (and all its sub-directories) for backups (.rpp-bak) of the current project. Keeps the set number of backups and deletes all older ones. Action cannot be undone.

- Number of backups to keep is set inside the script (default=5)
- Keeps one backup per different date no matter what
- Works with timestamped backups only
- Can be combined with Save action (40026) into a custom action, so that it tides things up each time you save.
- Requires JS_ReaScriptAPI


in ReaPack
It has to be native at some point but for now this looks very promising, thanks!

I have just started testing it and it does not show up as running action.. is that normal? Does it work nonetheless if I put it into my startup action?

Also, I suppose this only works once the project is saved and a project directory created.. I (and probably others) often do a lot of experimentation before we decide to save a project and thus we need backups for unsaved projects. Can it be made to also work with unsaved projects? For example by referencing a temporary backup directory and once the project is saved move the backups to the project directory and continue doing them there?

It would be extra greatness if it created a folder called "Backups" inside the project directory to save the backups to and keep the Project directory tidy.


EDIT:
Sadly does not work :/ I have now more backups in the project directory than specified in the script..

EDIT2: Oh now I got how it works! It is just an action to manually delete all older backups once there are more than specified. Got my hopes up that this did all the backup weeding automatically as a running script.

Last edited by Phazma; 07-20-2021 at 03:25 AM.
Phazma is offline   Reply With Quote