# How to make batch files in Windows 7

**URL:** <https://boards.straightdope.com/t/how-to-make-batch-files-in-windows-7/687777>\
**Category:** Factual Questions\
**Created:** [May 6, 2014, 2:56am UTC](https://boards.straightdope.com/t/how-to-make-batch-files-in-windows-7/687777 "2014-05-06T02:56:03Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![HipGnosis](https://avatars.discourse-cdn.com/v4/letter/h/76d3ee/32.png) [@HipGnosis](https://boards.straightdope.com/u/HipGnosis)\
**Post date:** [May 6, 2014, 6:46pm UTC](https://boards.straightdope.com/t/how-to-make-batch-files-in-windows-7/687777/21 "2014-05-06T18:46:35Z")

</div>

> [@brujaja](#):
>
> I’m afraid that PowerShell vanishes no matter where I start it from. If I type it into the search bar on the start menu and press “enter,” the window appears and vanishes. If I type in powershell but don’t press enter I get 3 choices, powershell, ISE, and modules. Clicking on any of these three produces the same results.

type in “powershell”, don’t press enter  
Right-click powershell from the choices and click ‘Run as administrator’ from the sub-menu.

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [May 6, 2014, 8:45pm UTC](https://boards.straightdope.com/t/how-to-make-batch-files-in-windows-7/687777/22 "2014-05-06T20:45:02Z")

</div>

> [@andrewm](#):
>
> FYI “echo \> file” on Windows does not produce an empty file. The file will contain a line of text saying “echo is on” or “echo is off”.

Good point. This works instead:

```auto

for /l %a in (0, 1, 9) do for /l %b in (0, 1, 9) do for /l %c in (0, 1, 9) do type nul > filename%a%b%c.txt

```

[Previous page](https://boards.straightdope.com/t/how-to-make-batch-files-in-windows-7/687777.md?page=1)
