|
|||||
SET TEXTLINE file.txt "line 1"
|
create file.txt, add "line 1" as the first line
|
SET TEXTLINE file.txt "line 2"
|
add "line 2" at end of file.txt
|
SET TEXTLINE file.txt "line 2" /a
|
same as above
|
SET TEXTLINE file.txt "line 0" /b
|
add "line 0" at beginning of file.txt
|
SET TEXTLINE file.txt "line 1a" /a "line 1"
|
add "line 1a" after "line 1"
|
SET TEXTLINE file.txt "line 1b" /b "line 2"
|
add "line 1b" before "line 2"
|
SET TEXTLINE file.txt "line 2" /d
|
delete "line 2"
|
SET TEXTLINE file.txt "last line"
|
add "last line" at end of file
|
SET TEXTLINE file.txt "las*" /d
|
delete line starting with "las" (as in "last line")
|
EXTRACT file.cab file.inf c:\thisdir
|
extract file.inf from file.cab and place in c:\thisdir
|
EXTRACT file.cab file.inf .
|
extract file.inf from file.cab and place in current directory (note the period as the targetdir parameter)
|
DIR
|
list contents of current directory
|
DIR *.txt
|
list all files with a .txt extension in current directory
|
PWD
|
display the current working directory
|
COPY FILE filename a:
|
copy filename to drive a:
|
COPY c:\test\* c:\test2 /s
|
copy contents of folder c:\test and all sub folders to c:\test2
|
MD newdirectory
|
create a directory named newdirectory in current directory
|
REN FILE filename newfilename
|
rename filename to newfilename
|
REN FILE *.txt *.doc
|
change all .txt extensions to .doc extensions
|
DEL FILE filename /y
|
delete filename, and do not confirm the deletion
|