Consider the following scenario. You use Microsoft Windows Defender to quarantine a file that you suspect is malicious. Then, you delete or move the folder from which you removed the file. Alternatively, you change the path of the folder. You later try to restore the file from quarantine.
In this scenario, you cannot restore the file.
This behavior occurs because Windows Defender restores a file to its original folder only if the folder exists in the same path as the original folder.
To work around this problem, make sure that the original folder from which you removed the file exists in the same path as the new folder. Then, restore the file from quarantine.