I have plenty of movie files saved in folders with roughly the following scheme.
Top-most folder: "The Matrix (1999)", then another folder "matrix movie" and then the actual movie itself: "matrix1999.avi"
I need a small program that can search my main movies folder "Movies" for the above situation and then sort ALL found movie folders as follows:
Top-most folder: "The Matrix (1999)" with the movie inside ""The Matrix (1999).avi" ...the previous middle folder "matrix movie" is now gone.
Incase the last-nested folder contains more that one avi's then its gonna be "The Matrix (1999)-part1.avi", "The Matrix (1999)-part2.avi", etc.
if there are more than one "middle" folders that should be discovered and again the *.avi files moved to the top-most folder, deleting the "middle" ones.
I had a similar problem the below one liner solved mine:
I was also looking for html files that are bigger than a threshold:
Hope it helps.