command prompt

wiZ

New Member
i know you can create folders and copy files but is there a way to MAKE a FILE in the command prompt? if so what is the command?
 
The answer is yes, but with a but....

If you are using Linux/OS X then do this:

Code:
touch /path/to/file/file.txt

or

Code:
/bin/echo "some text you want in a file" >> /path/to/file/file.txt

If you are using Windows you must download an addtional add on to Windows called Power Shell. I have very little experience in PS, but your syntax would look like this:

Code:
PS C:\>new-item -path C:\docs -name computerforum.txt -type "file" -value "some text"

You must download and install powershell

http://www.microsoft.com/windowsserver2003/technologies/management/powershell/download.mspx
 
I was playing with some old notes Tlarkin but just been to long. i was having a hard time. here's my notes 20 yrs ago.

create file with nothing in it.
copy:*.txt>>test

append files with something in the txt file.
copy *.* test/a

dir>text.txt

Oh well. something to play with.
 
I was playing with some old notes Tlarkin but just been to long. i was having a hard time. here's my notes 20 yrs ago.

create file with nothing in it.
copy:*.txt>>test

append files with something in the txt file.
copy *.* test/a

dir>text.txt

Oh well. something to play with.

DOS is gone though, so that may be depreciated. DOS died with the 9x kernel as all current Windows OSes are based off of NT.

I know the copy command can do some of that stuff but really it looks like the power shell is going to probably replace the command line eventually in Windows. It also makes sense as it is pretty powerful compared to CMD.
 
thanks

btw do you guys know any websites that teach everything about the command line? like a tutorial or something?
 
Back
Top