I have two folders, A and B which contain mostly similar file names, but some files are missing from
| 1.txt // this should be deleted
| asd.txt // this should be deleted
| asdfg.txt // this should be deleted
How can I delete all files from B that don't have a coresponding name with the same file in A? So, in the end B should have the same file names remaining as in A.
It doesn't really have to be powershell, I just need a way to bulk-remove the files on Windows 10.