Any time it detects new files, it will scan them and it will automatically delete anything that it deems malicious.
The antivirus doesn’t really ask users if they want to scan a particular file or directory. It will scan all types of files including archives, images, documents, spreadsheets, and more. It doesn’t limit itself to scanning executable or scripts.
Windows Defender proactively blocks threats.