PDA

View Full Version : command line (W2K)



naradaji
06-20-2003, 04:04 AM
Hi,

I want to learn how to create a file of any kind (like a word file for instance) using command-line.
Any help will be greatly appreciated.

Thanks,

-- narada

thCA
06-20-2003, 06:34 AM
Hi!

try this:

Copy con c:\name.doc
this is a test

(hit CTRL+Z and Enter to return to command promt)

naradaji
06-20-2003, 06:51 AM
cool!
May I ask what "con" is? how does this work?

Thanks!

-- narada

adg
06-20-2003, 07:07 AM
It's a "reserved" expression in DOS that relates to the Keyboard & Monitor (don't ask /images/forums/icons/smile.gif). I believe it orignally stood for "console", but don't quote me on that. In other words, DOS (and DOS emulation) reads it as "accept the input you get from the keyboard to the monitor and copy it to..."

Allan
<a target="_blank" href=http://www.tweakdatabase.com/idealbb>tweakxp.com</a>

BertImmenschuh
06-20-2003, 09:11 AM
Copy con is indeed the console meaning the monitor and keyboard and is left over from the early DOS days. The command sends what comes next to the file named. It is an Internal command in the OS.

It is most useful in writing batch .bat and text .txt files quickly and can be done when booted to a floppy disk. After the last line is written and Enter pressed, pressing Ctrl+Z then Enter closes the file and writes it to disk.

Downside is if you make a mistake on a line you can only backspace to retype it while the cursor is on that line. Once Enter is pressed after any line you can't go back, have to close the file and start at the beginning and redo the file.

Good judgement comes from experience, and experience comes from bad judgement

naradaji
06-23-2003, 12:27 AM
Thanks everybody!
It was great help!

-- narada

BertImmenschuh
06-23-2003, 09:02 AM
You're welcome, glad to help.

Good judgement comes from experience, and experience comes from bad judgement