I have two folders two different locations with a bunch of automatically generated (generated through install and repair/ reset) files in them.
Occasionally what happens is that a file of a particular name and extension is found in both folders which causes errors in the associated program, the solution is to delete one of the two so only one remains.
I use batch at work mostly the novice xcopy and so on commands, how i开发者_如何学JAVAf can I achieve my desired result?
The OP wrote:
Never mind this fixed it:
for /r C:\1\ %%f in (*) do if exist "C:\2\%%~nxf" del /s /q "C:\1\%%~nxf
精彩评论