I have a python script called script.py which I would like to run on all of the directories inside of a specific directory. What is the easiest way to do this using batch scripting?
My assumption is some usage of the FOR command, but I can’t quite make any leads to solve the problem using the command…
Use the /d operator on for:
This assumes you only need to execute one command per directory (
script.py %%d) if you need to execute more use braces(). Also I’m guessing there’s an execution engine needed first, but not sure what it is for you.A multi-line example: