creating a file from the command line
Is there any way to create a text (or any) file from the Windows command line? Suppose I wanted a text file located in C:\ called "file.txt" which contains the text "TEXT". I'm thinking of a command similar to this:
create C:\file.txt "TEXT"
Is there any functionality similar to this?
# 2 Re: creating a file from the command line
Or good old copy con C:\file.txt, enter - type the text - finish with ctrl-z & enter
S_M_A at 2007-11-10 3:41:01 >

# 3 Re: creating a file from the command line
I thought of that first but that requires user input. The way HighCommander4 describes it is without user input.
# 4 Re: creating a file from the command line
Oh, didn't realize that! You're probably right. This is intended for a batch file I guess.
S_M_A at 2007-11-10 3:43:05 >

# 5 Re: creating a file from the command line
Thank you PeejAvery, your solution works. (It is indeed for a batch file.)
What if my text has a enter (linefeed) in it? I need to be able to do it in one command...
EDIT: Scratch that, I can do it in multiple commands? But how *do* you make a second echo append the text to the already existing file rather than overwriting it?