Batch Script Commands - Batch Script

What are the commonly used batch commands?

Sl.No Commands Desciptions
1 VER
Shows the version of MS-DOS you are using.
2
ASSOC
Associates an extension with a file type (FTYPE), displays existing associations, or deletes an association.
3 CD
Helps in making changes to a different directory, or displays the current directory.
4 CLS
Clears the screen.
5 COPY
Copying files from one location to the other.
6 DEL
Deletes files and not directories.
7 DIR
Lists the contents of a directory.
8 DATE
Help to find the system date.
9 ECHO
Displays messages, or turns command echoing on or off.
10 EXIT
Exits the DOS console.
11 MD
Creates a new directory in the current location.
12 MOVE
Moves files or directories between directories.
13 PATH
Displays or sets the path variable.
14 PAUSE
Prompts the user and waits for a line of input to be entered.
15 PROMPT
Used to change or reset the cmd.exe prompt.
16 RD
Removes directories, but the directories need to be empty before they can be removed.
17 REN
Renames files and directories
18 REM
Used for remarks in batch files, preventing the content of the remark from being executed.
19 START
Starts a program in new window, or opens a document.
20
TIME
Sets or displays the time.
21 TYPE
Prints the content of a file or files to the output.
22 VOL
Displays the volume labels.
23 ATTRIB
Displays or sets the attributes of the files in the curret directory
24 CHKDSK
Checks the disk for any problems.
25 CHOICE
Provides a list of options to the user.
26 CMD
Invokes another instance of command prompt.
27 COMP
Compares 2 files based on the file size.
28 CONVERT
Converts a volume from FAT16 or FAT32 file system to NTFS file system.
29 DRIVERQUERY
Shows all installed device drivers and their properties.
30 EXPAND
Extracts files from compressed .cab cabinet files.
31 FIND
Searches for a string in files or input, outputting matching lines.
32 FORMAT
Formats a disk to use Windows-supported file system such as FAT, FAT32 or NTFS, thereby overwriting the previous content of the disk.
33 HELP
Shows the list of Windows-supplied commands.
34 IPCONFIG
Displays Windows IP Configuration. Shows configuration by connection and the name of that connection.
35 LABEL
Adds, sets or removes a disk label.
36 MORE
Displays the contents of a file or files, one screen at a time.
37 NET
Provides various network services, depending on the command used.
38 PING
Sends ICMP/IP "echo" packets over the network to the designated address.
39
SHUTDOWN
Shuts down a computer, or logs off the current user.
40
SORT
Takes the input from a source file and sorts its contents alphabetically, from A to Z or Z to A. It prints the output on the console.
41
SUBST
Assigns a drive letter to a local folder, displays current assignments, or removes an assignment.
42
SYSTEMINFO
Shows configuration of a computer and its operating system.
43
TASKKILL
Ends one or more tasks.
44
TASKLIST
Lists tasks, including task name and process id (PID).
45
XCOPY
This batch command copies files and directories in a more advanced way.
46 TREE Displays a tree of all subdirectories of the current directory to any level of recursion or depth.
47 FC Lists the actual differences between two files.
48 DISKPART Shows and configures the properties of disk partitions.
49 TITLE Sets the title displayed in the console window.
50 SET Displays the list of environment variables on the current system.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Batch Script Topics