|I have a directory that has a bunch of tv shows video files along with nfo and image files. Each nfo and image file is named after the associated tv show file. For example:|
Show Name - 1x01 - Episode Name.mkv, Show Name - 1x01 - Episode Name.nfo, Show Name - 1x01 - Episode Name.tbn
There are multiple files all set up in a similar manner in the directory.
There are cases where there will be duplicate video files and the filenames will be identical up to a certain point. So for example
Show Name - 1x01 - Episode Name.mkv, Show Name - 1x01.mkv
So as you can see above, the videos will be duplicates, and they will have the same name up until after the 1x01 (these numbers change based upon the season and episode number of the TV show).
What I am trying to do is to have a batch script scan the current directory, find any video files (either mkv or avi) that have the same filename up until after the numbers, and then delete the older of the two files.
Is this possible?