Switch to full style
Tools for hard drive diagnostics, repair, and data recovery
Post a reply

How to create a loop with several lines in MHDD batch file?

March 18th, 2021, 5:49

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 :oops:

Re: How to create a loop with several lines in MHDD batch fi

March 18th, 2021, 17:49

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

March 19th, 2021, 4:39

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

March 19th, 2021, 7:49

Sorry, I forgot one line in the batch script :idea:

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

March 19th, 2021, 9:56

Seems OK to me.

Re: How to create a loop with several lines in MHDD batch fi

March 19th, 2021, 15:25

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

March 19th, 2021, 23:20

fzabkar wrote:You may like to try HDDSuperTool. It's a lot more versatile and fully documented.

http://www.hddsuperclone.com/sitev1/hddsupertool


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.
Post a reply