All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: How to create a loop with several lines in MHDD batch file?
PostPosted: March 18th, 2021, 5:49 
Offline
User avatar

Joined: March 18th, 2021, 5:32
Posts: 7
Location: Thailand
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:


Top
 Profile  
 
 Post subject: Re: How to create a loop with several lines in MHDD batch fi
PostPosted: March 18th, 2021, 17:49 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 13098
Location: Australia
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:

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: How to create a loop with several lines in MHDD batch fi
PostPosted: March 19th, 2021, 4:39 
Offline
User avatar

Joined: March 18th, 2021, 5:32
Posts: 7
Location: Thailand
Thank you :!:

Will the following batch script work in MHDD 4.5 :?:

Code:
@loop:
reset
%error = iserror
if %error = 0 @end
goto @loop
@end:


Top
 Profile  
 
 Post subject: Re: How to create a loop with several lines in MHDD batch fi
PostPosted: March 19th, 2021, 7:49 
Offline
User avatar

Joined: March 18th, 2021, 5:32
Posts: 7
Location: Thailand
Sorry, I forgot one line in the batch script :idea:

Code:
@loop:
reset
init
%error = iserror
if %error = 0 @end
goto @loop
@end:


Top
 Profile  
 
 Post subject: Re: How to create a loop with several lines in MHDD batch fi
PostPosted: March 19th, 2021, 9:56 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 13098
Location: Australia
Seems OK to me.

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: How to create a loop with several lines in MHDD batch fi
PostPosted: March 19th, 2021, 15:25 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 13098
Location: Australia
You may like to try HDDSuperTool. It's a lot more versatile and fully documented.

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

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: How to create a loop with several lines in MHDD batch fi
PostPosted: March 19th, 2021, 23:20 
Offline
User avatar

Joined: March 18th, 2021, 5:32
Posts: 7
Location: Thailand
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group