[Command Prompt] [Programming] [Tips and Tricks] [Windows]
How to save a command written in CMD
Don't want to miss a single bit? Subscribe to our RSS Feed!
This is a short CMD tip. If you like to execute several CMD/DOS commands one by one, and you don’t like to do it manually, you should save all of these commands in one file. There are two solutions to do that:
First solution – create a file in CMD:
- Click Start – Run – type CMD, press ENTER
- In the Command prompt window write: “Copy con dos.bat” – press ENTRE
- Write CMD/DOS commands which you like to execute one by one (press Enter (new line) after every new command)
- When you are done press CTRL-Z. This will save file “dos.bat” in the folder where CMD window is open by default.
- Type dos.bat in CMD and press Enter. All CMD/DOS command will be executed immediately.
Creating file


Second solution – create a file in Notepad:
- From desktop – right mouse button – choose new – text document
- Change the name of the file to “dos.bat”
- Right mouse click on the file – choose Edit
- Write CMD/DOS commands which you like to execute one by one (press Enter (new line) after every new command)
- Save the file (in this case - on the desktop)
- Double click on the file “dos.bat” will execute CMD/DOS commands one by one.
Did you enjoy this post? Why not leave a comment below and continue the conversation, or Subscribe to Feed and get articles like this delivered automatically to your Email or feed reader.
1 comments:
thanks :]
Post a Comment