Tutorial on commonly used commands in Windows batch processing (cmd/bat)
Here are some commonly used Windows batch (cmd/bat) commands:
- echo: display the text or value of a variable.
- Say Hello World!
- Change directory: change the current directory.
- Command prompt: navigate to the Users folder in the C drive.
- List the files and subdirectories in the current directory.
- Example: dir
- Delete: Remove the file.
- delete myfile.txt
- duplicate files or directories.
- Duplicate file1.txt as file2.txt
- move: relocate a file or directory.
- Move the file file.txt to the destination C:\destination.
- Ren: Rename the file.
- rename file.txt to newfile.txt
- Create a new directory using mkdir.
- create a folder
- rmdir: remove directory.
- delete folder
- cls: clear all text in the Command Prompt window.
- clear screen
- Pause: Halt batch processing and wait for the user to press any key.
- take a break
- Launch a new window to execute a specified program or file.
- open the notepad.exe program
- taskkill: end processes that are currently running.
- Terminate the process.exe by force.
There are many other commands available for file operations, networking, system configurations, and more in addition to the common Windows batch processing commands listed above. For detailed information and examples, you can consult the official Windows documentation or other batch processing tutorials.