Formating Hard DISK

  • Thread starter Thread starter T
  • Start date Start date
T

T

Hi,

I have written a batch file which formats my 3 hards disks
but it stops and prompts me for a Yes(Y) or NO(N) answer
to confirm formatting.

Is there anyways to overcome this and automatically select
Yes. I can't find any switches to use.

Thanks
 
Try this in a batch file

FORMAT C:\ /s/u < type yes.txt

This in incumbant on having that text file with a singly "y" in it.
 
I am unwilling to play around with a hard drive. But trying to format a
diskette, I find that
echo|more|format a:
will feed format the hard return it wants to format A:. If format is
requiring Y, then you ought to be able to
echo Y|format c:
or
format c:<echo y

Assuming a series of prompts, like do you want to format another, an
approach like this could work:
echo y >%temp%.\%0.tmp
echo. >>%temp%.\%0.tmp
echo n >>%temp%.\%0.tmp
format <%temp%.\%0.tmp
del %temp%.\%0.tmp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top