File versioning - how to restore multiple files?

Hello all!

First topic :slight_smile: Want to know if it’s possible to write a script to restore all files to their oldest versions within a directory? The script should also ignore files that have no previous versions.

I’ve got command line (occ) & database admin access.

Thanks a lot!