Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to write a script that opens the cmd and runs some command that I wrote. How can I do it? and when I save the file - the ending is .txt? i'm not familiar with it so any help would be appreciated!


share|improve this question

closed as too broad by Raystafarian, Heptite, Kevin Panko, Moses, Mokubai Apr 12 '14 at 12:15

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

you just write the script in a text file and save as .bat. There are tons of resources out there and since you already about batch files, I'm sure you could find them. Try it out for yourself, and then come back if you run into issues. You could even click your own batch tag and look through some of the questions for examples. – Raystafarian Jul 28 '13 at 12:58

Notepad by default saves with a ".txt" filetype. When you are looking at the file you saved in Windows Explorer, rename the file (press F2) and change the .txt to .bat.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.