1.

Solve : Can a batch file press enter??

Answer»

I'm trying to put together a .bat for my grandma so she can do a one click c format, and slide a disc in to reinstall her os. I've never tried it before so I guess we will see if it works, but I'm stuck on GETTING the file to press enter once the command is given to
Format C: /u
I haven't been able to find any HELPFUL info :-/DLoad the appropiate bootdisk from bootdisk.com and follow the instructions...

What OS is grandma fooling around with ? ?OS is XP Home

I was just messing around with DOS and thought it would be a cool experiment, then I got stuck.
I was going to email the file to her, that's about the only thing she knows how to do with one So is there a way around it?A way around what ? ? ?lol

Having to press enter for the format to continue as a user, and instead having a command in the batch file do it for you.I BELIEVE you may have to do a prompt FOLLOWED by a series of if...else...then statements.

-rockQuote

I believe you may have to do a prompt followed by a series of if...else...then statements.

-rock

How does this solve his problem ? ?There is a tiny prog called CR.com which places a carriage return into the keyboard buffer. You'd call it in a batch file immediately before the prog waiting for input. You could modify CR to stack any key. Alas it stopped working with Win95.

but this works:

echo. | date

so format should work, tooHe doesn't want to format....


Discussion

No Comment Found