|
|
#1 (permalink) |
|
New Member
![]() Join Date: Apr 2004
Posts: 2
|
Hello ,
I am creating a batchfile which automaticly formats a removeable disk. Now I always get the question "Do you want to continue? yes/no" There is a parameter that bypasses this question. Who can tell me which one it is?? |
|
|
|
|
|
#2 (permalink) |
|
New Member
![]() Join Date: Apr 2004
Posts: 12
|
As far as I know, no version of format (DOS 6.22, DOS 7(Win98) or even WIN XP) asks that exact question when formatting a disk or any media...on XP, I seem to recall it's more like "Insert new disk for drive A: and press ENTER when ready..."
And there is no "yes/no" bypass command line switch on any of the above mentioned format versions I know of... Regardless, you can always create an "answer file" with any parameter(s) you need to answer back to any command line program waiting for keyboard input... Just create a text file and put the proper answer, a Y in your case on the first line, then hit CR. Save the text file and in your batch file use standard redirection symbol < to redirect input from the answer file to the command line instead of from the keyboard.... example: batch file might look like this: (DOS 6.22 example) @echo off format a: /u /s < answer.txt <EOF> answer.txt looks like this: Y<CR> <EOF> Obviously, <CR> just means to hit <Enter> key, not type in <CR> literally. And <EOF> is the invisible end of file marker placed automatically by the editor program. End result will be the diskette in A: gets unconditionally formatted, system files are transferred so it's a bootable diskette, and you didn't even see the "Do you want to continue" prompt.... Hope this helps... Jim |
|
|
|