Tutorial on commonly used commands in Windows batch processing (cmd/bat)

Here are some commonly used Windows batch (cmd/bat) commands:

  1. echo: display the text or value of a variable.
  2. Say Hello World!
  3. Change directory: change the current directory.
  4. Command prompt: navigate to the Users folder in the C drive.
  5. List the files and subdirectories in the current directory.
  6. Example: dir
  7. Delete: Remove the file.
  8. delete myfile.txt
  9. duplicate files or directories.
  10. Duplicate file1.txt as file2.txt
  11. move: relocate a file or directory.
  12. Move the file file.txt to the destination C:\destination.
  13. Ren: Rename the file.
  14. rename file.txt to newfile.txt
  15. Create a new directory using mkdir.
  16. create a folder
  17. rmdir: remove directory.
  18. delete folder
  19. cls: clear all text in the Command Prompt window.
  20. clear screen
  21. Pause: Halt batch processing and wait for the user to press any key.
  22. take a break
  23. Launch a new window to execute a specified program or file.
  24. open the notepad.exe program
  25. taskkill: end processes that are currently running.
  26. 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.

bannerAds