Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

format command automation

Status
Not open for further replies.

pcjunkey

Technical User
Nov 29, 2004
17
0
0
US
hey guys I'm writing a batch script and I was wondering if there was away to automate the format command when it asks you if you're sure you want to format? how can I force it to say yes? and when it asks for a volume label, how can I force that as well?


thanks
 
There will always be a confirmation prompt, albeit you could pass the volume information.

The volume label can be specified on the command line with /v:

I have not tried, but you best bet would be to use notepad and create a file to be called y.bat, consiting of:
y

(there is an invisible carriage return).

Then you can try:

Start, Run, cmd
format a: /v:"My floppy" /q <y.bat

I hope it does not work. Confirming a format is just basic good sense.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top