Open Windows Defender Security Center, and then select Virus & threat protection > Virus & threat protection settings > Add or remove exclusions.
Under Add an exclusion, select the files, folders, file types, or process. The exclusion will apply to subfolders within a folder as well.