DOS Batch Command Help

Jay

Golden Member
Oct 9, 1999
1,728
7
81
Trying to automate an install disk that will allow me to update older clients. Here's my dilema:

Del C:\RC5\*.*

After this command is prompted, you are asked to confirm (y/n). I've tried the switch /Y and -Y, both of which return "Too Many Paramaters".

Any idea how to automate the process?
 

conjur

No Lifer
Jun 7, 2001
58,686
3
0
I think this works...can't remember for sure:

1) Create a file called yes.txt by typing the following at a command prompt:

copy con yes.txt
y
^Z <- Ctrl-Z to save


Be sure to press <Enter> after the Y to get the CRLF in there.


Then, in your batch file, try:
DEL C:\RC5\*.* < yes.txt

Provided yes.txt is in the same path as the current directory when executing.

Also, DEL C:\RC5 would work, too. (I just like shorter commands :) )

HTH
 

Confused

Elite Member
Nov 13, 2000
14,166
0
0
Would it work like this:

De; C:\RC5\*.*
y


Cos doesn't it execute each line one at a time, then it would type the y in for you?

ConfusedBW
 

Confused

Elite Member
Nov 13, 2000
14,166
0
0
Oh well, i don't know much about DOS batch stuff! Just dippin my toes! And anyway, its an opportunity for a couple of posts added to the count! :)

ConfusedBW
 

conjur

No Lifer
Jun 7, 2001
58,686
3
0
Just like confusing things, don't ya? :D

Glad it worked, Jay! Nice to know me ol' DOS skills are still there :)
 

Confused

Elite Member
Nov 13, 2000
14,166
0
0


<< Just like confusing things, don't ya? :D >>



Yep, sure do! ;)

Hey, cummon, i'm only 17, i wasn't around when DOS was main OS, i only came into computers when Windows 98 came out! Actually, i still got that computer! It's been rebuilt and is sittin in the front room for my mum! K6 233, 64MB ram, 4gb hdd!

ConfusedBW
 

conjur

No Lifer
Jun 7, 2001
58,686
3
0


<< Hey, cummon, i'm only 17, i wasn't around when DOS was main OS, i only came into computers when Windows 98 came out! Actually, i still got that computer! It's been rebuilt and is sittin in the front room for my mum! K6 233, 64MB ram, 4gb hdd!

ConfusedBW
>>




heh heh...I have batch files that are almost as old as you. ;)
 

Wiz

Diamond Member
Feb 5, 2000
6,459
16
81
Hey, cummon, i'm only 17, i wasn't around when DOS was main OS, i only came into computers when Windows 98 came out! Actually, i still got that computer! It's been rebuilt and is sittin in the front room for my mum! K6 233, 64MB ram, 4gb hdd!

heheheheh...

MS_Dos 1980 - 2000 (deceased)

ConfusedBW 1984 -

heh heh...I have batch files that are almost as old as you.

I remember making batch files and basic programs back in '78. Pretty 'keen' stuff.
I also became an Adventure Grand Master in 1979. I wrote down the directions after mapping out the 'maze of twisty little passages' on a piece of green and white striped printer paper. I found this scrap about twelve years ago in some box after moving. I recognized it and had it laminated.
I carry it in my wallet, you never know when that game might be revived.

(/edit: changed date)
 

Confused

Elite Member
Nov 13, 2000
14,166
0
0
Well, it's 1984, i'm 18 in just under 2 months



<< heh heh...I have batch files that are almost as old as you. ;) >>

:Q:Q

Hehe, some computer commands older than me! :Q

CBW
 

htmlmasterdave

Golden Member
Jul 13, 2001
1,309
0
0
I first started really using computers when I was about.... 7 or 8, and i'm only turning 17 this may. But, in my school, most of the computers were on DOS, and i got a free 8088 @ 8 mhz with 512kb of ram and a 6 meg hard drive that I installed DOS on ;) DOS isn't that old, since it was used right up until Windows 3.11 (you needed dos to install windows in those days afaik). So that is easily up to 1994 or so... you have no excuse!!!! :D



<<

<< Just like confusing things, don't ya? :D >>



Yep, sure do! ;)

Hey, cummon, i'm only 17, i wasn't around when DOS was main OS, i only came into computers when Windows 98 came out! Actually, i still got that computer! It's been rebuilt and is sittin in the front room for my mum! K6 233, 64MB ram, 4gb hdd!

ConfusedBW
>>