I need a script to delete files of certain extensions if a similarly-named file doesnt exist in either of two other folders? Any windows script language is fine, powershell would be best since I already have a powershell script doing other things daily.
Example:
Main file = tv_show_5-5-12.wtv
log file = tv_show_5-5-12.log
There are several log, xml, and other file formats that are left scattered around and need to be cleaned up. They are always the same name with different extension, so I assume this is easy.
How can I scan certain folders full of these log files, and delete any that don't have an equivalent WTV file in one of two source folders?
Example:
Main file = tv_show_5-5-12.wtv
log file = tv_show_5-5-12.log
There are several log, xml, and other file formats that are left scattered around and need to be cleaned up. They are always the same name with different extension, so I assume this is easy.
How can I scan certain folders full of these log files, and delete any that don't have an equivalent WTV file in one of two source folders?
