How to close all independent preview windows with one click

I needed my colleagues to open multiple files for comparison, but I didn't want to use a program because it was too slow to open, so I chose to use the preview pane. Each time after use to a click to close, too much trouble, I would like to ask what command or script can achieve a key to close all independent preview windows

Maybe this link can help..
https://resource.dopus.com/t/open-and-close-viewer-with-single-hotkey/37586

Thank you very much. In fact, I have long defined the Space button to open independent preview windows. Since there are too many independent preview windows open, it is too troublesome to click to close them one by one. so, my needs are whether there is a command to close all open independent preview windows instead of closing them one by one.

Ah, I see what you mean, maybe there are experts who would be willing to help.

Close ALLVIEWERS

1 Like

Ok, thank you very much