开发者

Batch to filter out duplicates in separate directories

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜