External commands:
1. xcopy
Syntax: xcopy [source drive:][path] [destination drive:] [path][switch]
Where, switch may be:
Switch meaning
/S Copies all files and sub-directories except empty ones.
/C Continues to copy also after error occurs.
/Q Quite mode. Doesn’t display files while copying.
/H Copies hidden files.
/R Over-writes read-only files, too.
/V Verifies each new file when written into the bank.
Use: copies directory along with its contents 9i.e. its files and subdirectories) to destination.
Example: c :\> copy C: D:
Output: This will copy all source directories and sub-directories of the C drive disk to D drive disk.
2. edit
Syntax: edit [drive:][path][filename][switch]
switch meaning
/B Forces monochrome mode.
/H Displays the max no. of lines possible for our hardware.
/R load files in read only mode.
/S Forces the uses of short filenames.
/<nnn> Load binary files, wrapping lines to <nnn> characters wide.
/? Displays this help screen.
[file] Specifies initial files to load. Wild-cards and multiple file specs can be given.
Use: use to edit files.
Example: C :> \ EDIT autoexec.bat
Output: This command will open the DOS file autoexec.bat and will allow us to edit.
3. del
Deletes one or more files.
This command is used to delete a particular or more files.
Syntax:
del filename
erase filename
Options:
*.* All files in current folder
*.* /s all files in current folder and sub folders.
4. rd
Remove a directory, which by default must be empty of files for the command to succeed (the /s flag removes this restriction).
Syntax: rd directory
5.md
Makes a new directory. The parent of the directory specified will be created if it does not already exist.
Syntax: md directory
6.ren
Renames a file. Unlike the
Renames a file. Unlike the
move
command, this command cannot be used to rename subdirectories, or rename files across drives.Syntax: ren filename newname
7.cd
Change current working directory. Displays the current working directory when used without a path parameter.
cd f:
displays the current working directory on
F:
.cd directory
changes the working directory on the current drive to directory.
chdir e:directory
changes the working directory on
E:
to directory.cd \
changes the working directory to the root (top level) directory of the current drive.
8.cd..
changes the working directory to the parent directory (up one directory level).
No comments:
Post a Comment