Hey @Pcrimi :
You CAN do what you want since SpinRite can now be completely controlled from its command line.
If you exit from SpinRite to the DOS command prompt, then start it again with “spinrite list”, this will run SpinRite only enough to produce the listing of the system's drives, which it will then dump to the console and return to DOS.
Using that list, you can select whatever drive(s) you want SpinRite to run on by using one of the drive selection verbs (presumably "BIOS" in the case of a USB-connected SD card) followed by the BIOS number shown in the listing, like "81".
So a command to run a level 2 on that drive would be: “
spinrite auto level 2 bios 81 exit”.
The "auto" causes SpinRite to bypass all user prompting to run automatically and unattended.
The "level 2" is obvious.
The "bios" tells SpinRite to anticipate the BIOS drive designation which follows: 81.
The "exit" tells SpinRite to exit back to DOS after the scan is completed.
Next, you can use the little text editor you'll find on SpinRite's boot directory to create a looping DOS batch file:
@echo off
:scan
spinrite auto level 2 bios 81 exit
goto scan
That will do what you think... it will run a level 2 pass with SpinRite over and over on BIOS drive 81 until you interrupt it. The only glitch will be that when you do interrupt it, it will drop out of SpinRite and immediately try to re-run it. So you might need to ESCape from SpinRite then immediately hit CTRL-C or CTRL-X to break out of the Goto loop.
(It occurs to me that I ought to have SpinRite exit back to DOS with an "errorlevel" that's different when the user interrupted it. Then the last line of the batch file could be: "if not errorlevel 1 goto scan". I'm going to add that to SpinRite to make this sort of looping much more convenient. This is an advantage of allowing time for the paint to dry! Thanks!
)
Regardless of whether you decide to add this feature or not, I can't say enough about what a fantastic tool SpinRite is and I really appreciate what I have learned from you and the other users who have posted in this forum. Thanks!
Thanks @Pcrimi! Your support and enthusiasm for this work is much appreciated!