If I write:
ipconfig /all >> c: list.txt
will be addressed the output to the C: List.txt file
If instead I write:
Set /p rule_name = what name to the new rule?:
Set /p ip_block = which ip you want to block “%rule_name%”?
Netsh Advfirewall Firewall Add rule Name = “%rule_name%” dir = in action = block remoteip = “%ip_block%”
This last line is first compiled by variables and then executed.
Therefore if in the variable rule_name I insert AAA
And in the IP_Block variable I insert 184.108.40.206
Netsh Advfirewall Firewall Add rule name = AAA dir = in action = block remoteip = 220.127.116.11
And then it will be executed.
There is a way, to send the compiled row,
Netsh Advfirewall Firewall Add rule name = a dir = in action = block remoteip = 18.104.22.168
to a TXT file?
This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.