Hello
and I'm not finding a way to delete duplicate files in the same folder. I have files that are with the following filename.
file.txt
file(2).txt
it is standard to have (2) in these duplicate files.
How do I delete using batch?
Delete files duplicated
Moderator: DosItHelp
Re: Delete files duplicated
Not bullet proof as this can also delete file named foo(bar).txt
Code: Select all
H:\deleteme>dir /a /b
file(2).txt
file(3).txt
file.txt
foobar(1).txt
foobar(2).txt
foobar.txt
H:\deleteme>del *(*).txt
H:\deleteme>dir /a /b
file.txt
foobar.txt
H:\deleteme>