Source: http://blogs.msdn.com/adioltean/archive/2005/02/25/380759.aspx
The tricks below aren't explicitly written out, but they're very useful in practice
1) To copy stuff from a directory to the current folder, you only need to specify the source folder:
y:\privates>copy C:\WINDOWS\system32\clients\twclient\x86
C:\WINDOWS\system32\clients\twclient\x86\twcli32.msi
1 file(s) copied.
2) Create a file without using an editor:
y:\privates>copy con sample.txt
This is a text file.
Another line...
^Z
1 file(s) copied.
y:\privates>type sample.txt
This is a text file.
Another line...
3) Create a zero-length file
C:\>copy nul empty.txt
1 file(s) copied.
C:\>dir empty.txt
Volume in drive C has no label.
Volume Serial Number is FCCD-E1D0
Directory of C:\
02/26/2005 10:38 PM 0 empty.txt
1 File(s) 0 bytes
0 Dir(s) 24,429,268,992 bytes free
4) Continue writing to the end of a txt file (append), note the /A parameter
y:\privates>copy /A abc.txt + con
abc.txt
con
BBB
^Z
1 file(s) copied.
y:\privates>copy /A abc.txt + con
abc.txt
con
CCC
^Z
1 file(s) copied.
y:\privates>type abc.txt
AAA
BBB
CCC
The tricks below aren't explicitly written out, but they're very useful in practice
1) To copy stuff from a directory to the current folder, you only need to specify the source folder:
y:\privates>copy C:\WINDOWS\system32\clients\twclient\x86
C:\WINDOWS\system32\clients\twclient\x86\twcli32.msi
1 file(s) copied.
2) Create a file without using an editor:
y:\privates>copy con sample.txt
This is a text file.
Another line...
^Z
1 file(s) copied.
y:\privates>type sample.txt
This is a text file.
Another line...
3) Create a zero-length file
C:\>copy nul empty.txt
1 file(s) copied.
C:\>dir empty.txt
Volume in drive C has no label.
Volume Serial Number is FCCD-E1D0
Directory of C:\
02/26/2005 10:38 PM 0 empty.txt
1 File(s) 0 bytes
0 Dir(s) 24,429,268,992 bytes free
4) Continue writing to the end of a txt file (append), note the /A parameter
y:\privates>copy /A abc.txt + con
abc.txt
con
BBB
^Z
1 file(s) copied.
y:\privates>copy /A abc.txt + con
abc.txt
con
CCC
^Z
1 file(s) copied.
y:\privates>type abc.txt
AAA
BBB
CCC
C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
