File Manipulation Commands: These manipulate files. Examples are COPY, DEL (delete), TYPE (display file to screen) and, DIR (directory - or list all files in current directory).
In the commands given below, we adopt the convention that anything enclosed in square brackets, [ ], is optional. For example, [x:\path\] refers to an optional device and/or path.
copy [x:\path\]source.ext [x:\path\]target.ext
copies source file to target file.
del [x:\path\]filename.ext
deletes file
move [x:\path\]source.ext [x:\path\]target.ext
moves source to target
type [x:\path\]filename.ext
displays the contents of file to screen. This only works for ASCII text files.
rename [x:\path\]source target.ext
renames file. Note, target must be in same directory as source.
dir [x:\path\filename.ext]
lists all files in directory.
The following commands can be used to create and remove subdirectories and set the default drive and directory. Again anything in square brackets [ ] is optional.
* To change the default drive, at the MS-DOS prompt type the drive letter followed by a colon. For example, to make a: the default drive
C:\> H:
* To change the default path, use chdir or cd, the change directory command. For example, to make FILES, a subdirectory of DOS the default use
C:\Temp> chdir files
To make the root directory the default, use
C:\Temp> cd \
* To make (i.e. create) a directory use mkdir or md, the make directory command. That is
mkdir [\path\]directory
md [\path\]directory
* To remove a directory use rmdir or rd,the remove directory command. That is
rmdir [\path\]directory
rd [\path\]directory
Important! The directory must be empty before you remove it
* To display the directory structure use
tree [drive:\path\]
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment