Need help using a LONG command in DOS!

LeStEr

Diamond Member
Dec 28, 1999
3,412
0
0
I need to use a long command in dos but after i type a portion of the command out i can type anymore. People have told me i can make a "Batch" file using my long command and then run this "Batch" file.
How would i go about doing this?? Or is there annother way i could use this long command in dos.
Thnx
 

hominid skull

Senior member
Nov 13, 1999
971
0
0
Just create a new text file in windows and type the command into the text file. If this only one command then this will work fine. Rename the text file to say test.bat, batch files are just renamed text files, and run the file in a dos box. In my example just type test and press return, making sure you are in the directory that you created the batch file in the first place.

Hope it helps..
 

rootaxs

Platinum Member
Oct 22, 2000
2,487
0
71
(this one may sound silly, but hey :) )

If you don't have Windows and are purely on DOS you can type:

> Copy Con test.bat

It will then give you a carriage return (blank line after this) where you can start typing your dos commands one line after the other.

To save your file just hit F6 and Enter.
 

michaelh20

Senior member
Sep 4, 2000
482
0
0
and what it's doing is using the device con, which is the console to copy to a file.

add @echo off to keep the whole file from being echoed to the screen..........

if it isn't obvious already.....
 

Moonbender

Golden Member
Oct 19, 2000
1,046
0
0
Hey that copy con command is pretty interesting, thanks! Didn't know it even though I used DOS pretty long. :)
 

rootaxs

Platinum Member
Oct 22, 2000
2,487
0
71
nice follow up michael! :)

Moonbender: yep, nifty huh? even with Win on all my machines now i still kinda like doing DOS :)