Question: ```
`@echo off
 chcp 1251>nul
 help | findstr /b [A-Z] > 1.txt
 for /F "tokens=1*" %%1 in ('1.txt') do (help %%1) > %%1.txt
 del 1.txt `

```

I guess it should be done somehow this way but it doesnt work. This should "take" the name of a command and then use it for "help command"(help if for e,g) and then type it(With echo ofc) in the txt file with name of a command.

Answer: 
The following should work:

```
@echo off
chcp 1251 > nul
help | findstr /B ".[ABCDEFGHIJKLMNOPQRSTUVWXYZ]" > 1.txt
for /F %%1 in (1.txt) do (help %%1) > %%1.txt
del 1.txt

```

There were `''` around `1.txt` in the set of `for`, so it was interpreted as a command rather than a text file.

`tokens=1*` is not necessary as you are using the first token only, so `tokens=1`, which is the default, is enough.

---

However, you can do the same without a temporary file `1.txt` like this:

```
@echo off
chcp 1251 > nul
for /F %%1 in ('help ^| findstr /B ".[ABCDEFGHIJKLMNOPQRSTUVWXYZ]"') do (help %%1) > %%1.txt

```

---

Both scripts above require administrator privileges to run without interruptions, because of the `diskpart` command, which requires such privileges even for displaying the help text, stupidly.

The `SC` command will halt the scripts due to a `y`/`n` user prompt whether or not to display help for sub-commands `query` and `queryex` too. To suppress that, you could try to pipe such a letter into `help %%1`, that is, to prepend it with `echo y|` or `echo n|`.
This is repeat of the following that Rob van der Woude coded up..

<http://www.robvanderwoude.com/sourcecode.php?src=allhelp_nt>

I think there are a couple variations on his site as well.

<http://www.robvanderwoude.com/allhelp.php>

Thanks.