Page 1 of 1
How to create a loop with several lines in MHDD batch file?
Posted: March 18th, 2021, 5:49
by Alexander Firsov
I want to make an
MHDD batch script with the following
2 commands in a row to be repeated indefinitely or 100000 times, non-stop
- Code:
RST
INIT
I know how to repeat a single line a certain number of times. But how to repeat more than one line in a row?
Please advise a newbie

Re: How to create a loop with several lines in MHDD batch fi
Posted: March 18th, 2021, 17:49
by fzabkar
Here is an example that may help you:
- Code:
; read all HDD modules from Fujitsu MPG / MPE SA
reset
waitnbsy
; enable VSCs
regs = $fa $43 $42 $41 $40 $a0 $c1
; get module
%modid = 0
@loop:
%modid = %modid + 1
if %modid = 256 @end
waitnbsy
regs = %modid $01 $00 $00 $00 $00 $c2
waitnbsy
%error = iserror
if %error = 1 @loop
checkdrq
sectorsto = fuj_mods\%modid.bin
goto @loop
@end:
Re: How to create a loop with several lines in MHDD batch fi
Posted: March 19th, 2021, 4:39
by Alexander Firsov
Thank you
Will the following batch script work in MHDD 4.5
- Code:
@loop:
reset
%error = iserror
if %error = 0 @end
goto @loop
@end:
Re: How to create a loop with several lines in MHDD batch fi
Posted: March 19th, 2021, 7:49
by Alexander Firsov
Sorry, I forgot one line in the batch script
- Code:
@loop:
reset
init
%error = iserror
if %error = 0 @end
goto @loop
@end:
Re: How to create a loop with several lines in MHDD batch fi
Posted: March 19th, 2021, 9:56
by fzabkar
Seems OK to me.
Re: How to create a loop with several lines in MHDD batch fi
Posted: March 19th, 2021, 15:25
by fzabkar
You may like to try HDDSuperTool. It's a lot more versatile and fully documented.
http://www.hddsuperclone.com/sitev1/hddsupertool
Re: How to create a loop with several lines in MHDD batch fi
Posted: March 19th, 2021, 23:20
by Alexander Firsov
Many thanks. I didn't know this software.
Unfortunately my SSD disk is so sick that only DOS can detect it. I tried many Linux tools, all of them are not detecting my faulty drive. I have to work with the drive at the lowest possible level in DOS environment.