There is no command to exclude a file or folder from checking. But you can exclude a file or folder by being more careful when including files and folders in the checking.
Imagine for example that the folder "src" contain the folders "a", "b" and "c". To exclude "c" this command can be used:
cppcheck src/a src/b
All files under "src/a" and "src/b" are then checked.
The flag --file-list
might also be
useful.