Any batchfile / Powershell gurus about?

Soldato
Joined
21 Jun 2004
Posts
2,790
Location
Berkshire
I've got an issue at work which we need some kind of script for, I could code something up in seconds for Linux/Unix but I've always found scripting on Windows a pain in the backside.

Let's say I have a directory full of files with two different extensions, e.g. 123.abc and 123.def

I need to remove all of the *.def files from the directory, but they can only be deleted if there is a matching *.abc file with the same filename

Does anyone know how this can be achieved with a script? There are thousands of files in this directory so definatley not something which can be done by hand!

Thanks
 
Back
Top Bottom