How do I block whole folders from the Internet?

Y

Yousuf Khan

Even today there is new angst. I keep getting an
unsolicited email from
"Broadband-IPTV Asia Event Team" even though I've
Junk Mailed it with every possible rule. It
just keeps popping up. How do they do this?
What is the email program that you are using? If you use Thunderbird for
example, you can just mark it as Junk, and from that point forward it'll
recognize it as Junk, as well as similar messages like it. It uses
something called Bayesian filtering which is a pretty sophisticated
algorithm for recognizing similar patterns. It's much more flexible than
simply adding a username to a blocked name list.

Yousuf Khan
 
Joined
May 5, 2015
Messages
1
Reaction score
0
Here's a short script you should be able to cut and past into a batch file.
This will add rules to block for both inbound and outbound internet traffic for ALL EXEs in that folder, and all sub-folders.

I checked this on Windows 7 but I think it should be good for other versions of Windows like Windows 8 and maybe XP.

-----------------------------------------------------------------------------
for /R %%a in (*.exe) do (
netsh advfirewall firewall add rule name="Blocked with Batchfile %%a" dir=in program="%%a" action=block
netsh advfirewall firewall add rule name="Blocked with Batchfile %%a" dir=out program="%%a" action=block
)
--------------------------------------------------------------------------------

Just open up Notepad and copy / paste in the above script. Save it to something like 'BLOCKALL.BAT'.
Make sure it has the '.BAT' file extension so windows knows it's a batch file.

Place the batch file in the folder with the programs you want to block, and run it from there. Remember it also includes all the EXEs in sub-folders as well.

Regards,
Lardzor
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top