I want to make exception of bunch of folders where I store some malicious files for further analyses as I’m malware staff on some malware removal forums. I want to know if there is a command that can be executed from the command line because there are many folders, so to be able to put it in a loop to make exception for each directory?
No, there’s no such command line tool.
And honestly, the exclusion list isn’t really meant to contain hundreds of items; they’d have to be matched for every scanning operation the engine makes, which could slow things down. I’d suggest to exclude the parent folder if possible (or if the files have a special extension for example, the particular filetype).