The Windows 10 Search parameters may be found in the registry under the key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Search\CrawlScopeManager\Windows\SystemIndex\WorkingSetRules.
They are stocked in sub-keys named 0, 1, 2 etc.
As the items under each key are not documented, I would use templates.
Here is one a screenshot of one exclusion for the folder of C:\Temp\PrintScreen:

This uses a weird URL of :
file:///C:\[bac78df2-ab37-4a4c-ba64-d7d57071563b]\Temp\PrintScreen\.
However, most sources I have found claim that it also accepts URLs that are
written more simply. In that case, this would look like
file:///C:\Temp\PrintScreen\.
As Windows Search is disabled on my computer, you will need to test.
If it works, then a PowerShell script would be easy to write,
with the only problem being finding the next available number for a sub-key.
It would perhaps be useful to stop the Windows Search system service while this
registry update is done.