DOS Tricks: Creating File From DOS / CMD Command Line…

By Angsuman Chakraborty, Gaea News Network
Sunday, April 20, 2008

There is an old trick from Dos days (still valid in all windows under cmd prompt or even command.com) when we wanted to create a quick file without loading up edit (edit.com) was to use copy con. The exact syntax is:
copy con filename

Subsequent lines you type are copied to the file. You could end the content by pressing Ctrl-Z and then pressing Enter.

Good old days :)

My other favorite trick was marking directories as hidden and system so others couldn’t access it, especially useful in shared computers.

What are your favorite DOS tricks?

Discussion
September 15, 2009: 3:36 am

I have so many… visit my website… but my favorite is using the Attrib command to find files. cd\ to the root and run
Attrib SomeFileName.whatever /s
And it can’t hide… without some serious intervention.

Echo bla bla bla > filename.txt
Echo bla bla bla >> filename.txt
>> apends > overwrites/creates new
type filename.txt

dir *.exe > filename.txt
type filename.txt

xcopy /? > filename.txt
type filename.txt

Even more useful to capture the guid nmbers identifier of a partition when setting up VHD’s

bcdedit > filenae.txt
type filename.txt

…or load it into notepad.

Ok boys and girls.. thats our lesson for today. Tomorrow I’ll teach you how to play spades.

YOUR VIEW POINT
NAME : (REQUIRED)
MAIL : (REQUIRED)
will not be displayed
WEBSITE : (OPTIONAL)
YOUR
COMMENT :