You can automate compressing files with WinRAR and provide an exclusion list using a command line interface. You can exclude the files and folders using -x
switch in the command.
Run Command Prompt (cmd.exe
) and type the following command:
"C:\Program Files\WinRAR\Rar.exe" a -x*\A -x*.bat -xfile3.doc folder.rar folder
If you want to automate your GUI, you can add this command to a context menu when you right-click on a folder. You would need to add the following to the registry:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\rar_with_exclusion]
@="WinRAR with exclusion list"
[HKEY_CLASSES_ROOT\Directory\shell\rar_with_exclusion\command]
@="\"C:\\Program Files\\WinRAR\\Rar.exe\" a -x*\\a -xfile3.doc -x*.bat \"%1.rar\" \"%1\""
Refer to this document to learn how to modify the registry.
This is what you will get in the end:
