How can I apply my custom python script to all blender files in folder?

I have 90 files in which I want to use a custom script that will find the missing file for all 90 scripts and resave it.

but the issue is I don’t know how to call all 90 files from cmd. I can do a single file from the console but I need help with batch files.

Thanks.

you need a second ‘control’ script that can launch blender for each one of the files and run said script. just use pathlib, get all of the files in the directory, and use subprocess/pipe to run the command inside a loop. easy peasy lemon squeezy

I am very new to python so if you can provide me example script it would be great.

sure, here you go:

those were the top results from a google search btw