ComputerForum.com ComputerForum.com  
TigerDirect
 
Go Back   Computer Forum > Computer Software > General Software

Reply
 
LinkBack Thread Tools Display Modes
Old 04-15-2004, 02:27 PM   #1 (permalink)
New Member
 
Join Date: Apr 2004
Posts: 2
Question Format harddrive without yes/no question

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??
MatthijsdeHaan is offline   Reply With Quote


Old 04-16-2004, 09:52 AM   #2 (permalink)
New Member
 
Join Date: Apr 2004
Posts: 12
Default

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
jbob is offline   Reply With Quote
Old 04-19-2004, 08:56 AM   #3 (permalink)
New Member
 
Join Date: Apr 2004
Posts: 2
Default

I already found it

echo y|format "drive letter": /q /v:"name"

Thanks anyway
MatthijsdeHaan is offline   Reply With Quote
Old 10-22-2005, 06:21 PM   #4 (permalink)
banned
 
Apokarteron's Avatar
 
Join Date: Oct 2005
Location: OS X
Age: 18
Posts: 1,920
Default

press 'yes'
Apokarteron is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:32 PM.


Powered by: vBulletin Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Copyright © 2002-2007 Computer Forum and Web Design Forum