On my server, it's easiest for me to delete video files from within my Plex client right after I watch them. This leaves their parent folders and sub folders behind, but I have various methods of cleaning those up periodically. I'm having trouble cleaning the "Sample" videos that are included with some, while leaving the sample files for undeleted videos. The sample's parent folder almost always contains other small files and folders, so are not actually empty, but are always less than 50mb. Thus, the problem: The sample files can be up to 200mb. I also have legit videos that are between 50-200mb. (I can easily find the folders under 50mb by other means.) (Also, the files are no longer listed in my torrent client either so deleting "errored" torrents from there is not an option. That is what I normally do though.)
For example:
Sample I want to keep
V:\Videos\Movies\This.Great.Movie.720p\
This.Great.Movie.720p.mkv 802MB
This.Great.Movie.720p.nfo 39kb
Subs\
English.srt 276kb
French.srt 194kb
Sample\
This.Great.Movie.720p.sample.mkv 58mb
Sample I want to delete
V:\Videos\Movies\The.Best.Movie.1080p\
The.Best.Movie.1080p.nfo 16kb
Subs\
English.srt 128kb
French.srt 47kb
Sample\
The.Best.Movie.1080p.sample.mkv 194mb
So far I've come up with a long string that still contains legit video files I want to keep, so it doesn't really work. Can I filter the size of the parent folder, not including sub folders? Any other suggestions to make my query better are welcome. Thanks in advance!
Current Query:
dir: "@Complete Files"/ size:<200mb !sample !sample/ !attrib:L !.actors !.actors/ !subs/ !subs !subtitles/ !subtitles !extras/ !Extras !screens/ !screens !covers/ !covers !soundtrack !soundtrack/ !Featurettes/ !Featurettes !"Bonus Material/" !"~ Music/" !"~ Software/" !"~ Ebooks/"
Edit: My query result didn't work so I noted that.