Page 1 of 1

How to delete obsolete screens

Posted: 12 Feb 2024, 13:56
by srudin
Searched, but couldn't find any other post about that - sorry if I missed it.

So I have a database with items in it. They all have screens. Sometimes I add some items, sometimes I remove. I know that I can delete items within Videonizer and delete their screens at the same time. However, for some reasons that cannot be done / has not been done like this all the time and items get deleted outside Videonizer. "Clean up current DB" nicely removes the obsolete items from the database in that case.

The problem is that the screens then remain orphaned. Is there any function that allows me to clean up all screens / files in a directory that are not linked to an item in the database?

Re: How to delete obsolete screens

Posted: 13 Feb 2024, 23:48
by admin
The cleanup feature has Options:
cleanupSettings.png
cleanupSettings.png (14.14 KiB) Viewed 716 times

Re: How to delete obsolete screens

Posted: 14 Feb 2024, 08:53
by srudin
Yep, but the screens I am talking about are not referenced in the database anymore...

Imagine you delete some items and forget to check that option. After you run it you realize your mistake and want to get rid of the obsolete screens for which you have no items in your db anymore. Now what?

I would imagine something like "Scan for Screenlists in a folder" with the option to delete all screens where no match is found...

Re: How to delete obsolete screens

Posted: 14 Feb 2024, 09:20
by admin
srudin wrote:
14 Feb 2024, 08:53
I would imagine something like "Scan for Screenlists in a folder" with the option to delete all screens where no match is found...
The problem is that Videonizer knows nothing about already deleted Items (and Screenlists).
What would be the criterion to delete a file then?
I would like to invent something, but I am afraid it is not reliable in this case.

Re: How to delete obsolete screens

Posted: 14 Feb 2024, 10:18
by srudin
Basically this would be a database to folder match: Every file in the specified folder that is not referenced in the database should be deleted.

Re: How to delete obsolete screens

Posted: 29 Feb 2024, 07:49
by srudin
I would like to invent something, but I am afraid it is not reliable in this case.
Why not? Under "DB Tools" add the function "Clean up Folder". Upon click display a warning that all files in the folder and its subfolders will be deleted if not referenced in the current db. Then allow folder selection. After that, start the process by gathering all files in the folder and its subfolders. Check for each file if it is referenced in an item of the current db as file, screen/animation or picture. If not, delete it. (Might need some additional path matching or just compare the file names only.)

Re: How to delete obsolete screens

Posted: 12 Mar 2024, 22:57
by admin
Implemented in Videonizer 21.0.0.0.
Please check.

Re: How to delete obsolete screens

Posted: 13 Mar 2024, 07:03
by srudin
Wow - perfect service! Works nicely, thank you very much!