To answer a simple question
Of course its possible to make such a script.
I think this is a good example to learn XY scripting from the help
and by reading the examples here in the forum.
I did the same month ago.
If you then have real problems and questions ask here again
Windows 11 Home, Version 24H2 (OS Build 26100.5074) Portable x64 XYplorer (Actual version, including betas)
Display settings 1920 x 1080 Scale 100%
Everything 1.5.0.1396a (x64), Everything Toolbar 2.0.3, Listary Pro 6.3.5.94