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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS DOS Batch file in Win95 2

Status
Not open for further replies.

Pccoordinator

IS-IT--Management
Feb 22, 2000
101
US
I am writing a batch file to store on my desktop as an Icon.<br>
I need to know the command that tells the computer to continue (as it would if you hit the enter key) so that the batch doesn't stop and ask you to hit enter after you put a disk in the drive as well as when it asks for volume label.<br>
Any help would greatly be appreciated!
 
echo y¦ format a: /v:volume_name<br>
<br>
It will still print the &quot;Hit ENTER to continue&quot; but it automatically formats the disk. Use /q if you want to do a &quot;quick&quot; format. &quot;format /?&quot; gives you all the options for format.<br>
<br>
Hope this helps,<br>
Paul Kincaid<br>
<br>
P.S. Make sure there is no space between the &quot;y&quot; and the pipe - for some reason it won't work that way.
 
The batch file partially works but when it gets to the line format another it locks up and the only way to close the dos window is to Ctrl Break and terminate the batch file.
 
Hmmm....&nbsp;&nbsp;Unfortunately I only have WinNT machines around, but when I do this (without the quotes) -- &quot;echo y¦ format a: /v:volume /q&quot; it formats and exits with no prompts...<br><br>Is the batch file actually on the desktop, or are you using a shortcut to the batch file?<br><br>I'm stumped, I think I can get my hands on a Win98 machine this afternoon -- I'll try it there and see if there are any problems.<br><br>
 
I found the same problem as PCcoordinator but got round it in this way.&nbsp;&nbsp;In the batch file the command is:-<br><br>format a: /v:volume_label /q &lt; yn.txt<br><br>Then require a text file containing on separate lines :-<br><br>Y<br>N<br><br>Just as above - I made sure I put a return after the N as well.&nbsp;&nbsp;Can put the .TXT file anywhere and just put the full path to it in the batch command.&nbsp;&nbsp;Hope this helps.<br>
 
Many thanks for all your help. The response from rauleigh finished the batch.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top